diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2022-12-01 16:11:24 +0800 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2022-12-07 21:05:20 +0100 |
commit | 3f6fb1cfaf30d0d701d877ffacfd88dd6bcc5841 (patch) | |
tree | 82addfc838c8123f5e3e49a7d8fecd9a875ea510 /drivers/leds/leds-lp5521.c | |
parent | 135780f1048b3f956f5b10bb23dec9c2d2c4ef6d (diff) |
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/leds-lp5521.c')
-rw-r--r-- | drivers/leds/leds-lp5521.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index 7ff20c260504..19478d9c19a7 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c @@ -469,7 +469,7 @@ static ssize_t lp5521_selftest(struct device *dev, ret = lp5521_run_selftest(chip, buf); mutex_unlock(&chip->lock); - return scnprintf(buf, PAGE_SIZE, "%s\n", ret ? "FAIL" : "OK"); + return sysfs_emit(buf, "%s\n", ret ? "FAIL" : "OK"); } /* device attributes */ |