summaryrefslogtreecommitdiff
path: root/drivers/leds/trigger
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-12-01 16:11:24 +0800
committerPavel Machek <pavel@ucw.cz>2022-12-07 21:05:20 +0100
commit3f6fb1cfaf30d0d701d877ffacfd88dd6bcc5841 (patch)
tree82addfc838c8123f5e3e49a7d8fecd9a875ea510 /drivers/leds/trigger
parent135780f1048b3f956f5b10bb23dec9c2d2c4ef6d (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/trigger')
-rw-r--r--drivers/leds/trigger/ledtrig-pattern.c2
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,