mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
rtc: pcf2127: use sysfs_emit() instead of sprintf()
Use sysfs_emit() instead of sprintf() in the sysfs show callback (timestamp_show) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst. Reviewed-by: Bruno Thomsen <bruno.thomsen@gmail.com> Link: https://patch.msgid.link/20261029132339.925021-2-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
bc9a04e1e1
commit
8d2735de39
|
|
@ -972,7 +972,7 @@ static ssize_t timestamp_show(struct device *dev,
|
|||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
return sprintf(buf, "%llu\n", (unsigned long long)ts);
|
||||
return sysfs_emit(buf, "%llu\n", (unsigned long long)ts);
|
||||
}
|
||||
|
||||
static ssize_t timestamp0_show(struct device *dev,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user