Skip to content

Commit 0600cf9

Browse files
Nebu0528lag-linaro
authored andcommitted
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>
1 parent b522794 commit 0600cf9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/leds/leds-lp5569.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,12 @@ static ssize_t lp5569_selftest(struct device *dev,
410410
/* Test LED Open */
411411
pos = lp5569_led_open_test(led, buf);
412412
if (pos < 0)
413-
return sprintf(buf, "FAIL\n");
413+
return sysfs_emit(buf, "FAIL\n");
414414

415415
/* Test LED Shorted */
416416
pos += lp5569_led_short_test(led, buf);
417417
if (pos < 0)
418-
return sprintf(buf, "FAIL\n");
418+
return sysfs_emit(buf, "FAIL\n");
419419

420420
for (i = 0; i < chip->pdata->num_channels; i++) {
421421
/* Restore current */

0 commit comments

Comments
 (0)