diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2022-12-01 09:11:24 +0100 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2022-12-07 21:05:20 +0100 |
commit | 3f6fb1cfaf30d0d701d877ffacfd88dd6bcc5841 (patch) | |
tree | 82addfc838c8123f5e3e49a7d8fecd9a875ea510 /drivers/leds/trigger | |
parent | leds: is31fl319x: Fix setting current limit for is31fl319{0,1,3} (diff) | |
download | linux-3f6fb1cfaf30d0d701d877ffacfd88dd6bcc5841.tar.xz linux-3f6fb1cfaf30d0d701d877ffacfd88dd6bcc5841.zip |
leds: use sysfs_emit() to instead of scnprintf()
Replace the open-code with sysfs_emit() to simplify the code.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'drivers/leds/trigger')
-rw-r--r-- | drivers/leds/trigger/ledtrig-pattern.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/trigger/ledtrig-pattern.c b/drivers/leds/trigger/ledtrig-pattern.c index 43a265dc4696..885ca63f383f 100644 --- a/drivers/leds/trigger/ledtrig-pattern.c +++ b/drivers/leds/trigger/ledtrig-pattern.c @@ -155,7 +155,7 @@ static ssize_t repeat_show(struct device *dev, struct device_attribute *attr, mutex_unlock(&data->lock); - return scnprintf(buf, PAGE_SIZE, "%d\n", repeat); + return sysfs_emit(buf, "%d\n", repeat); } static ssize_t repeat_store(struct device *dev, struct device_attribute *attr, |