Skip to content

Commit

Permalink
regulator: bd9571mwv: Convert device attribute to sysfs_emit()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven authored and Mark Brown committed Mar 15, 2021
1 parent 9cbc23f commit 1deceab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/bd9571mwv-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 1deceab

Please sign in to comment.