1234567891011121314151617181920212223242526272829 |
- From a75b58a46423cfd9b1f73581f4bd2ac2ae743996 Mon Sep 17 00:00:00 2001
- From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <[email protected]>
- Date: Wed, 2 Aug 2023 18:07:45 +0200
- Subject: [PATCH 1/6] leds: turris-omnia: Use sysfs_emit() instead of sprintf()
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- Use the dedicated sysfs_emit() function instead of sprintf() in sysfs
- attribute accessor brightness_show().
- Signed-off-by: Marek Behún <[email protected]>
- Link: https://lore.kernel.org/r/[email protected]
- Signed-off-by: Lee Jones <[email protected]>
- ---
- drivers/leds/leds-turris-omnia.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
- --- a/drivers/leds/leds-turris-omnia.c
- +++ b/drivers/leds/leds-turris-omnia.c
- @@ -194,7 +194,7 @@ static ssize_t brightness_show(struct de
- 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,
|