[PATCH v3 07/11] leds: class: Use correct type for brightness_hw_changed field
From: Armin Wolf
Date: Fri Nov 20 2026 - 16:25:31 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 beaf23993063..a2b5373460e2 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -236,7 +236,7 @@ struct led_classdev {
#endif
#ifdef CONFIG_LEDS_BRIGHTNESS_HW_CHANGED
- int brightness_hw_changed;
+ unsigned int brightness_hw_changed;
struct kernfs_node *brightness_hw_changed_kn;
#endif
--
2.56.1