aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/leds/leds-gpio.c')
-rw-r--r--drivers/leds/leds-gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 3d8bc327a68d..504cc26c7e4b 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -121,7 +121,7 @@ static int __devinit create_gpio_led(const struct gpio_led *template,
121 } 121 }
122 led_dat->cdev.brightness_set = gpio_led_set; 122 led_dat->cdev.brightness_set = gpio_led_set;
123 if (template->default_state == LEDS_GPIO_DEFSTATE_KEEP) 123 if (template->default_state == LEDS_GPIO_DEFSTATE_KEEP)
124 state = !!gpio_get_value(led_dat->gpio) ^ led_dat->active_low; 124 state = !!gpio_get_value_cansleep(led_dat->gpio) ^ led_dat->active_low;
125 else 125 else
126 state = (template->default_state == LEDS_GPIO_DEFSTATE_ON); 126 state = (template->default_state == LEDS_GPIO_DEFSTATE_ON);
127 led_dat->cdev.brightness = state ? LED_FULL : LED_OFF; 127 led_dat->cdev.brightness = state ? LED_FULL : LED_OFF;