aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/asus-laptop.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 23449508d86b..88cc9a1045b4 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -246,12 +246,15 @@ static struct workqueue_struct *led_workqueue;
246#define ASUS_LED(object, ledname) \ 246#define ASUS_LED(object, ledname) \
247 static void object##_led_set(struct led_classdev *led_cdev, \ 247 static void object##_led_set(struct led_classdev *led_cdev, \
248 enum led_brightness value); \ 248 enum led_brightness value); \
249 static enum led_brightness object##_led_get( \
250 struct led_classdev *led_cdev); \
249 static void object##_led_update(struct work_struct *ignored); \ 251 static void object##_led_update(struct work_struct *ignored); \
250 static int object##_led_wk; \ 252 static int object##_led_wk; \
251 static DECLARE_WORK(object##_led_work, object##_led_update); \ 253 static DECLARE_WORK(object##_led_work, object##_led_update); \
252 static struct led_classdev object##_led = { \ 254 static struct led_classdev object##_led = { \
253 .name = "asus::" ledname, \ 255 .name = "asus::" ledname, \
254 .brightness_set = object##_led_set, \ 256 .brightness_set = object##_led_set, \
257 .brightness_get = object##_led_get, \
255 } 258 }
256 259
257ASUS_LED(mled, "mail"); 260ASUS_LED(mled, "mail");
@@ -399,6 +402,11 @@ static void write_status(acpi_handle handle, int out, int mask)
399 { \ 402 { \
400 int value = object##_led_wk; \ 403 int value = object##_led_wk; \
401 write_status(object##_set_handle, value, (mask)); \ 404 write_status(object##_set_handle, value, (mask)); \
405 } \
406 static enum led_brightness object##_led_get( \
407 struct led_classdev *led_cdev) \
408 { \
409 return led_cdev->brightness; \
402 } 410 }
403 411
404ASUS_LED_HANDLER(mled, MLED_ON); 412ASUS_LED_HANDLER(mled, MLED_ON);