diff options
author | Marek Behún <kabel@kernel.org> | 2023-08-02 18:07:45 +0200 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-08-18 10:17:49 +0100 |
commit | 72a29725b6f2577fa447ca9059cdcd17100043b4 (patch) | |
tree | 34f5589696eb00bf77f1eb1b34f9e166f3a93d20 /drivers/leds | |
parent | 43a707ae58406200597b03a5be782e726b3c175b (diff) | |
download | lwn-72a29725b6f2577fa447ca9059cdcd17100043b4.tar.gz lwn-72a29725b6f2577fa447ca9059cdcd17100043b4.zip |
leds: turris-omnia: Use sysfs_emit() instead of sprintf()
Use the dedicated sysfs_emit() function instead of sprintf() in sysfs
attribute accessor brightness_show().
Signed-off-by: Marek Behún <kabel@kernel.org>
Link: https://lore.kernel.org/r/20230802160748.11208-4-kabel@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-turris-omnia.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c index 64b2d7b6d3f3..ffcaf228e44a 100644 --- a/drivers/leds/leds-turris-omnia.c +++ b/drivers/leds/leds-turris-omnia.c @@ -166,7 +166,7 @@ static ssize_t brightness_show(struct device *dev, struct device_attribute *a, if (ret < 0) return ret; - return sprintf(buf, "%d\n", ret); + return sysfs_emit(buf, "%d\n", ret); } static ssize_t brightness_store(struct device *dev, struct device_attribute *a, |