aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 18:39:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 18:39:36 -0400
commit0dd52d0df02733dfc2d5f3824e41b96492305384 (patch)
tree4cfd84b7a66d71d83c624275d889136fb23a33c9 /drivers/leds
parentc37efa932598de5e30330a1414e34d9e082e0d9e (diff)
parentfde1132374c9ba7da98a73b9a3c150dca6cf8502 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: add driver for Atmel AT42QT2160 Sensor Chip Input: max7359 - use threaded IRQs Input: add driver for Maxim MAX7359 key switch controller Input: add driver for ADP5588 QWERTY I2C Keypad Input: add touchscreen driver for MELFAS MCS-5000 controller Input: add driver for OpenCores Keyboard Controller Input: dm355evm_keys - remove dm355evm_keys_hardirq Input: synaptics_i2c - switch to using __cancel_delayed_work() Input: ad7879 - add support for AD7889 Input: atkbd - rely on input core to restore state on resume Input: add generic suspend and resume for input devices Input: libps2 - additional locking for i8042 ports
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/leds-clevo-mail.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c
index 1813c84ea5fc..f2242db54016 100644
--- a/drivers/leds/leds-clevo-mail.c
+++ b/drivers/leds/leds-clevo-mail.c
@@ -93,6 +93,8 @@ static struct dmi_system_id __initdata mail_led_whitelist[] = {
93static void clevo_mail_led_set(struct led_classdev *led_cdev, 93static void clevo_mail_led_set(struct led_classdev *led_cdev,
94 enum led_brightness value) 94 enum led_brightness value)
95{ 95{
96 i8042_lock_chip();
97
96 if (value == LED_OFF) 98 if (value == LED_OFF)
97 i8042_command(NULL, CLEVO_MAIL_LED_OFF); 99 i8042_command(NULL, CLEVO_MAIL_LED_OFF);
98 else if (value <= LED_HALF) 100 else if (value <= LED_HALF)
@@ -100,6 +102,8 @@ static void clevo_mail_led_set(struct led_classdev *led_cdev,
100 else 102 else
101 i8042_command(NULL, CLEVO_MAIL_LED_BLINK_1HZ); 103 i8042_command(NULL, CLEVO_MAIL_LED_BLINK_1HZ);
102 104
105 i8042_unlock_chip();
106
103} 107}
104 108
105static int clevo_mail_led_blink(struct led_classdev *led_cdev, 109static int clevo_mail_led_blink(struct led_classdev *led_cdev,
@@ -108,6 +112,8 @@ static int clevo_mail_led_blink(struct led_classdev *led_cdev,
108{ 112{
109 int status = -EINVAL; 113 int status = -EINVAL;
110 114
115 i8042_lock_chip();
116
111 if (*delay_on == 0 /* ms */ && *delay_off == 0 /* ms */) { 117 if (*delay_on == 0 /* ms */ && *delay_off == 0 /* ms */) {
112 /* Special case: the leds subsystem requested us to 118 /* Special case: the leds subsystem requested us to
113 * chose one user friendly blinking of the LED, and 119 * chose one user friendly blinking of the LED, and
@@ -135,6 +141,8 @@ static int clevo_mail_led_blink(struct led_classdev *led_cdev,
135 *delay_on, *delay_off); 141 *delay_on, *delay_off);
136 } 142 }
137 143
144 i8042_unlock_chip();
145
138 return status; 146 return status;
139} 147}
140 148