Skip to content

Commit bfb1ad3

Browse files
committed
firewire: core: add memo about the caller of show functions for device attributes
In the case of firewire core function, the caller of show functions for device attributes is not only sysfs user, but also device initialization. This commit adds memo about it against the typical assumption that the functions are just dedicated to sysfs user. Link: https://lore.kernel.org/lkml/[email protected]/ Signed-off-by: Takashi Sakamoto <[email protected]>
1 parent 946593d commit bfb1ad3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/firewire/core-device.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ static ssize_t show_immediate(struct device *dev,
322322
if (value < 0)
323323
return -ENOENT;
324324

325+
// Note that this function is also called by init_fw_attribute_group() with NULL pointer.
325326
return buf ? sysfs_emit(buf, "0x%06x\n", value) : 0;
326327
}
327328

@@ -357,6 +358,7 @@ static ssize_t show_text_leaf(struct device *dev,
357358
}
358359
}
359360

361+
// Note that this function is also called by init_fw_attribute_group() with NULL pointer.
360362
if (buf) {
361363
bufsize = PAGE_SIZE - 1;
362364
} else {

0 commit comments

Comments
 (0)