aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <[email protected]>2021-03-12 14:02:42 +0100
committerMark Brown <[email protected]>2021-03-15 15:42:12 +0000
commit1deceabbdc0dd3162def1e26acb2e57a93275909 (patch)
tree93c4de1089e9d3640775ac63a0d3e44b36beccbd
parent9cbc23f7d51fb0b1363bdfdd0b770aa7b5982f2f (diff)
regulator: bd9571mwv: Convert device attribute to sysfs_emit()
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
-rw-r--r--drivers/regulator/bd9571mwv-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/bd9571mwv-regulator.c b/drivers/regulator/bd9571mwv-regulator.c
index a4d406022587..ba020a45f238 100644
--- 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 sprintf(buf, "%s\n", bdreg->bkup_mode_enabled ? "on" : "off");
+ return sysfs_emit(buf, "%s\n", bdreg->bkup_mode_enabled ? "on" : "off");
}
static ssize_t backup_mode_store(struct device *dev,