[PATCH 07/10] leds: class: Use correct type for brightness_hw_changed field
From: Armin Wolf
Date: Sun Oct 18 2026 - 09:57:07 EST
Device drivers can supply a unsigned integer using
led_classdev_notify_brightness_hw_changed(), but the associated
field can only store signed integers, leading to issues for very
large brightness values.
Fix this by using the correct type for the brightness_hw_changed
field.
Signed-off-by: Armin Wolf <W_Armin@xxxxxx>
---
include/linux/leds.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 6f975078cc14..a057ae623d5a 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -235,7 +235,7 @@ struct led_classdev {
#endif
#ifdef CONFIG_LEDS_BRIGHTNESS_HW_CHANGED
- int brightness_hw_changed;
+ unsigned int brightness_hw_changed;
#endif
#ifdef CONFIG_LEDS_TRIGGERS_HW_CHANGED
--
2.56.0