diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2021-03-12 14:02:42 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-03-15 16:42:12 +0100 |
commit | 1deceabbdc0dd3162def1e26acb2e57a93275909 (patch) | |
tree | 93c4de1089e9d3640775ac63a0d3e44b36beccbd /drivers/regulator | |
parent | regulator: bd9571mwv: Fix regulator name printed on registration failure (diff) | |
download | linux-1deceabbdc0dd3162def1e26acb2e57a93275909.tar.xz linux-1deceabbdc0dd3162def1e26acb2e57a93275909.zip |
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 <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>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/bd9571mwv-regulator.c | 2 |
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, |