mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
rtc: bq32k: use sysfs_emit() instead of sprintf()
Use sysfs_emit() instead of sprintf() in the sysfs show callback (bq32k_sysfs_show_tricklecharge_bypass) to conform to the recommended sysfs attribute formatting guidelines in Documentation/filesystems/sysfs.rst. Link: https://patch.msgid.link/20261029132339.925021-4-alexandre.belloni@bootlin.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
This commit is contained in:
parent
946584fe01
commit
187c4ed20a
|
|
@ -210,7 +210,7 @@ static ssize_t bq32k_sysfs_show_tricklecharge_bypass(struct device *dev,
|
|||
if (error)
|
||||
return error;
|
||||
|
||||
return sprintf(buf, "%d\n", (reg & BQ32K_TCFE) ? 1 : 0);
|
||||
return sysfs_emit(buf, "%d\n", (reg & BQ32K_TCFE) ? 1 : 0);
|
||||
}
|
||||
|
||||
static ssize_t bq32k_sysfs_store_tricklecharge_bypass(struct device *dev,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user