diff mbox series

[v3,3/6] leds: turris-omnia: use sysfs_emit() instead of sprintf()

Message ID 20230802160748.11208-4-kabel@kernel.org
State New
Headers show
Series leds: turris-omnia: updates | expand

Commit Message

Marek Behún Aug. 2, 2023, 4:07 p.m. UTC
Use the dedicated sysfs_emit() function instead of sprintf() in sysfs
attribute accessor brightness_show().

Signed-off-by: Marek Behún <kabel@kernel.org>
---
 drivers/leds/leds-turris-omnia.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lee Jones Aug. 18, 2023, 9:18 a.m. UTC | #1
On Wed, 02 Aug 2023 18:07:45 +0200, Marek Behún wrote:
> Use the dedicated sysfs_emit() function instead of sprintf() in sysfs
> attribute accessor brightness_show().
> 
> 

Applied, thanks!

[3/6] leds: turris-omnia: use sysfs_emit() instead of sprintf()
      commit: 72a29725b6f2577fa447ca9059cdcd17100043b4

--
Lee Jones [李琼斯]
diff mbox series

Patch

diff --git a/drivers/leds/leds-turris-omnia.c b/drivers/leds/leds-turris-omnia.c
index bb2a2b411a56..9fca0acb2270 100644
--- a/drivers/leds/leds-turris-omnia.c
+++ b/drivers/leds/leds-turris-omnia.c
@@ -196,7 +196,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,