summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeel Bullywon <neelb2403@gmail.com>2026-02-07 21:18:25 +0300
committerLee Jones <lee@kernel.org>2026-03-10 12:22:55 +0300
commit0600cf91c0c3b749f2f6ef4c43f62c8c09d1eb82 (patch)
treee1d78258f111021abe599e2b95695de91600f07a
parentb5227947e68e7515ba449b870338909ed32ac8d2 (diff)
downloadlinux-0600cf91c0c3b749f2f6ef4c43f62c8c09d1eb82.tar.xz
leds: lp5569: Use sysfs_emit instead of sprintf()
Replace sprintf() with sysfs_emit(), which is the modern standard for formatting sysfs output. This change aligng with the kernel's best practices and ensures usage of the most up to date API. Signed-off-by: Neel Bullywon <neelb2403@gmail.com> Link: https://patch.msgid.link/20260207181825.13481-1-neelb2403@gmail.com Signed-off-by: Lee Jones <lee@kernel.org>
-rw-r--r--drivers/leds/leds-lp5569.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-lp5569.c b/drivers/leds/leds-lp5569.c
index 786f2aa35319..a252ba6c455d 100644
--- a/drivers/leds/leds-lp5569.c
+++ b/drivers/leds/leds-lp5569.c
@@ -410,12 +410,12 @@ static ssize_t lp5569_selftest(struct device *dev,
/* Test LED Open */
pos = lp5569_led_open_test(led, buf);
if (pos < 0)
- return sprintf(buf, "FAIL\n");
+ return sysfs_emit(buf, "FAIL\n");
/* Test LED Shorted */
pos += lp5569_led_short_test(led, buf);
if (pos < 0)
- return sprintf(buf, "FAIL\n");
+ return sysfs_emit(buf, "FAIL\n");
for (i = 0; i < chip->pdata->num_channels; i++) {
/* Restore current */