aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/leds/leds-gpio.c3
-rw-r--r--include/linux/leds.h3
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 0daa2d21cbde..8fa352ac20f8 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -93,7 +93,8 @@ static int __devinit create_gpio_led(const struct gpio_led *template,
93 } 93 }
94 led_dat->cdev.brightness_set = gpio_led_set; 94 led_dat->cdev.brightness_set = gpio_led_set;
95 led_dat->cdev.brightness = LED_OFF; 95 led_dat->cdev.brightness = LED_OFF;
96 led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME; 96 if (!template->retain_state_suspended)
97 led_dat->cdev.flags |= LED_CORE_SUSPENDRESUME;
97 98
98 ret = gpio_direction_output(led_dat->gpio, led_dat->active_low); 99 ret = gpio_direction_output(led_dat->gpio, led_dat->active_low);
99 if (ret < 0) 100 if (ret < 0)
diff --git a/include/linux/leds.h b/include/linux/leds.h
index 17d277e0c4a6..376fe07732ea 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -141,7 +141,8 @@ struct gpio_led {
141 const char *name; 141 const char *name;
142 const char *default_trigger; 142 const char *default_trigger;
143 unsigned gpio; 143 unsigned gpio;
144 u8 active_low; 144 u8 active_low : 1;
145 u8 retain_state_suspended : 1;
145}; 146};
146 147
147struct gpio_led_platform_data { 148struct gpio_led_platform_data {