200d693b7349735ae2e77e9c16ce6a7976b84b7e
[openwrt/staging/dangole.git] /
1 From 72a29725b6f2577fa447ca9059cdcd17100043b4 Mon Sep 17 00:00:00 2001
2 From: Marek BehĂșn <kabel@kernel.org>
3 Date: Wed, 2 Aug 2023 18:07:45 +0200
4 Subject: leds: turris-omnia: Use sysfs_emit() instead of sprintf()
5 MIME-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8
9 Use the dedicated sysfs_emit() function instead of sprintf() in sysfs
10 attribute accessor brightness_show().
11
12 Signed-off-by: Marek BehĂșn <kabel@kernel.org>
13 Link: https://lore.kernel.org/r/20230802160748.11208-4-kabel@kernel.org
14 Signed-off-by: Lee Jones <lee@kernel.org>
15 ---
16 drivers/leds/leds-turris-omnia.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19 (limited to 'drivers/leds/leds-turris-omnia.c')
20
21 --- a/drivers/leds/leds-turris-omnia.c
22 +++ b/drivers/leds/leds-turris-omnia.c
23 @@ -166,7 +166,7 @@ static ssize_t brightness_show(struct de
24 if (ret < 0)
25 return ret;
26
27 - return sprintf(buf, "%d\n", ret);
28 + return sysfs_emit(buf, "%d\n", ret);
29 }
30
31 static ssize_t brightness_store(struct device *dev, struct device_attribute *a,