projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cbc23f
)
regulator: bd9571mwv: Convert device attribute to sysfs_emit()
author
Geert Uytterhoeven
<geert+renesas@glider.be>
Fri, 12 Mar 2021 13:02:42 +0000
(14:02 +0100)
committer
Mark Brown
<broonie@kernel.org>
Mon, 15 Mar 2021 15:42:12 +0000
(15:42 +0000)
Convert the "backup_mode" device attribute from sprintf() to
sysfs_emit(), as the latter is aware of the PAGE_SIZE buffer.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link:
https://lore.kernel.org/r/20210312130242.3390038-4-geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/bd9571mwv-regulator.c
patch
|
blob
|
history
diff --git
a/drivers/regulator/bd9571mwv-regulator.c
b/drivers/regulator/bd9571mwv-regulator.c
index a4d406022587d59ded2f49ab830931e338286858..ba020a45f238e764e48a62af325329f34da81779 100644
(file)
--- a/
drivers/regulator/bd9571mwv-regulator.c
+++ b/
drivers/regulator/bd9571mwv-regulator.c
@@
-174,7
+174,7
@@
static ssize_t backup_mode_show(struct device *dev,
{
struct bd9571mwv_reg *bdreg = dev_get_drvdata(dev);
- return s
printf
(buf, "%s\n", bdreg->bkup_mode_enabled ? "on" : "off");
+ return s
ysfs_emit
(buf, "%s\n", bdreg->bkup_mode_enabled ? "on" : "off");
}
static ssize_t backup_mode_store(struct device *dev,