diff options
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-clevo-mail.c | 8 | ||||
-rw-r--r-- | drivers/leds/leds-dac124s085.c | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/drivers/leds/leds-clevo-mail.c b/drivers/leds/leds-clevo-mail.c index 8ee83ceb4a7d..a498135a4e80 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[] = { | |||
93 | static void clevo_mail_led_set(struct led_classdev *led_cdev, | 93 | static 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 | ||
105 | static int clevo_mail_led_blink(struct led_classdev *led_cdev, | 109 | 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, | |||
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 | ||
diff --git a/drivers/leds/leds-dac124s085.c b/drivers/leds/leds-dac124s085.c index 098d9aae7259..2913d76ad3d2 100644 --- a/drivers/leds/leds-dac124s085.c +++ b/drivers/leds/leds-dac124s085.c | |||
@@ -148,3 +148,4 @@ module_exit(dac124s085_leds_exit); | |||
148 | MODULE_AUTHOR("Guennadi Liakhovetski <lg@denx.de>"); | 148 | MODULE_AUTHOR("Guennadi Liakhovetski <lg@denx.de>"); |
149 | MODULE_DESCRIPTION("DAC124S085 LED driver"); | 149 | MODULE_DESCRIPTION("DAC124S085 LED driver"); |
150 | MODULE_LICENSE("GPL v2"); | 150 | MODULE_LICENSE("GPL v2"); |
151 | MODULE_ALIAS("spi:dac124s085"); | ||