aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/led-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/led-core.c')
-rw-r--r--drivers/leds/led-core.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/leds/led-core.c b/drivers/leds/led-core.c
index 50b579ad948e..aaa8eba9099f 100644
--- a/drivers/leds/led-core.c
+++ b/drivers/leds/led-core.c
@@ -127,3 +127,19 @@ void led_set_brightness(struct led_classdev *led_cdev,
127 __led_set_brightness(led_cdev, brightness); 127 __led_set_brightness(led_cdev, brightness);
128} 128}
129EXPORT_SYMBOL(led_set_brightness); 129EXPORT_SYMBOL(led_set_brightness);
130
131int led_update_brightness(struct led_classdev *led_cdev)
132{
133 int ret = 0;
134
135 if (led_cdev->brightness_get) {
136 ret = led_cdev->brightness_get(led_cdev);
137 if (ret >= 0) {
138 led_cdev->brightness = ret;
139 return 0;
140 }
141 }
142
143 return ret;
144}
145EXPORT_SYMBOL(led_update_brightness);