summaryrefslogtreecommitdiff
path: root/drivers/leds/led-class.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2025-12-04 15:25:19 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2025-12-04 15:25:19 -0800
commit7b8653a5799b9b15d7b3d98a0203d09963be4c87 (patch)
tree27b09a687f1023984131b9b3245c820afcf62f49 /drivers/leds/led-class.c
parent980190a9473dd2c842518057bf9ddcbaeba75209 (diff)
parent072cd5f458d76b9e15d89ebdaea8b5cb1312eeef (diff)
Merge tag 'leds-next-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds
Pull LED updates from Lee Jones: "Updates: - Add optional GPIO enable pin support to PWM LED driver Fixes: - Allow LED module 0 to be added to module bank in lp50xx driver - Fix upboard LED driver module alias to ensure proper auto-loading - Update LP5009 to support 3 modules for a total of 9 LEDs - Skip LEDs without color components in cros_ec driver instead of failing probe - Fix GPIO descriptor leaks in netxbig error paths by releasing acquired GPIOs - Allow LED_COLOR_ID_MULTI in qcom-lpg driver for greater flexibility - Enable LP55XX common LED use without FW_LOADER_USER_HELPER - Ensure lp50xx chip is enabled before any I2C communication Cleanups: - Use fwnode_for_each_child_node() instead of fwnode_for_each_available_child_node() in LED drivers - Use device_get_next_child_node() instead of fwnode_get_next_available_child_node() in LED flash drivers - Replace sprintf() with sysfs_emit() in sysfs show functions for improved bounds checking - Replace system_wq() with system_percpu_wq() in the input event trigger - Reorder include files to alphabetic order in the PWM LED driver - Do not enable TRILED in qcom-lpg when configuring PWM - Drop duplicate LEDS_EXPRESSWIRE config from Kconfig Removals: - Remove arcxcnn_bl.txt Device Tree binding documentation Devicetree bindings: - Convert ArcticSand arc2c0608 LED driver binding to DT Schema - Add default-brightness property to common LED binding - Add enable-gpios property to PWM LED binding - Add PM7550 to qcom,spmi-flash-led compatible - Explain standalone PWM usage in qcom-lpg binding" * tag 'leds-next-6.19' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/leds: (21 commits) leds: rgb: leds-qcom-lpg: Don't enable TRILED when configuring PWM dt-bindings: leds: qcom-lpg: Explain standalone PWM usage leds: rgb: leds-qcom-lpg: Allow LED_COLOR_ID_MULTI leds: pwm: Reorder include files to alphabetic order leds: pwm: Add optional GPIO enable pin support dt-bindings: leds: pwm: Add enable-gpios property leds: trigger: Replace use of system_wq() with system_percpu_wq() leds: led-class: Replace sprintf() with sysfs_emit() in sysfs show functions dt-bindings: leds: qcom,spmi-flash-led: Add PM7550 leds: netxbig: Fix GPIO descriptor leak in error paths leds: leds-lp50xx: Enable chip before any communication leds: Drop duplicate LEDS_EXPRESSWIRE config leds: leds-cros_ec: Skip LEDs without color components leds: leds-lp50xx: LP5009 supports 3 modules for a total of 9 LEDs leds: upboard: Fix module alias leds: leds-lp50xx: Allow LED 0 to be added to module bank leds: lp55xx_common: Enable use without FW_LOADER_USER_HELPER dt-bindings: leds: Add default-brightness property to common.yaml leds: flash: Use fwnode_get_next_child_node() instead leds: Use fwnode_for_each_child_node() instead ...
Diffstat (limited to 'drivers/leds/led-class.c')
-rw-r--r--drivers/leds/led-class.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index f3faf37f9a08..885399ed0776 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -38,7 +38,7 @@ static ssize_t brightness_show(struct device *dev,
brightness = led_cdev->brightness;
mutex_unlock(&led_cdev->led_access);
- return sprintf(buf, "%u\n", brightness);
+ return sysfs_emit(buf, "%u\n", brightness);
}
static ssize_t brightness_store(struct device *dev,
@@ -80,7 +80,7 @@ static ssize_t max_brightness_show(struct device *dev,
max_brightness = led_cdev->max_brightness;
mutex_unlock(&led_cdev->led_access);
- return sprintf(buf, "%u\n", max_brightness);
+ return sysfs_emit(buf, "%u\n", max_brightness);
}
static DEVICE_ATTR_RO(max_brightness);
@@ -122,7 +122,7 @@ static ssize_t brightness_hw_changed_show(struct device *dev,
if (led_cdev->brightness_hw_changed == -1)
return -ENODATA;
- return sprintf(buf, "%u\n", led_cdev->brightness_hw_changed);
+ return sysfs_emit(buf, "%u\n", led_cdev->brightness_hw_changed);
}
static DEVICE_ATTR_RO(brightness_hw_changed);