summaryrefslogtreecommitdiffstats
path: root/drivers/leds
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 15:39:36 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 15:39:36 -0700
commit0dd52d0df02733dfc2d5f3824e41b96492305384 (patch)
tree4cfd84b7a66d71d83c624275d889136fb23a33c9 /drivers/leds
parentc37efa932598de5e30330a1414e34d9e082e0d9e (diff)
parentfde1132374c9ba7da98a73b9a3c150dca6cf8502 (diff)
downloadop-kernel-dev-0dd52d0df02733dfc2d5f3824e41b96492305384.zip
op-kernel-dev-0dd52d0df02733dfc2d5f3824e41b96492305384.tar.gz
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 1813c84..f2242db 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[] = {
static void clevo_mail_led_set(struct led_classdev *led_cdev,
enum led_brightness value)
{
+ i8042_lock_chip();
+
if (value == LED_OFF)
i8042_command(NULL, CLEVO_MAIL_LED_OFF);
else if (value <= LED_HALF)
@@ -100,6 +102,8 @@ static void clevo_mail_led_set(struct led_classdev *led_cdev,
else
i8042_command(NULL, CLEVO_MAIL_LED_BLINK_1HZ);
+ i8042_unlock_chip();
+
}
static 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,
{
int status = -EINVAL;
+ i8042_lock_chip();
+
if (*delay_on == 0 /* ms */ && *delay_off == 0 /* ms */) {
/* Special case: the leds subsystem requested us to
* chose one user friendly blinking of the LED, and
@@ -135,6 +141,8 @@ static int clevo_mail_led_blink(struct led_classdev *led_cdev,
*delay_on, *delay_off);
}
+ i8042_unlock_chip();
+
return status;
}
OpenPOWER on IntegriCloud