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.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 78b0e273a903..57ff20fecf57 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -11,7 +11,6 @@
11 * 11 *
12 */ 12 */
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/init.h>
15#include <linux/platform_device.h> 14#include <linux/platform_device.h>
16#include <linux/gpio.h> 15#include <linux/gpio.h>
17#include <linux/leds.h> 16#include <linux/leds.h>
@@ -204,6 +203,9 @@ static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev)
204 led.default_state = LEDS_GPIO_DEFSTATE_OFF; 203 led.default_state = LEDS_GPIO_DEFSTATE_OFF;
205 } 204 }
206 205
206 if (of_get_property(child, "retain-state-suspended", NULL))
207 led.retain_state_suspended = 1;
208
207 ret = create_gpio_led(&led, &priv->leds[priv->num_leds++], 209 ret = create_gpio_led(&led, &priv->leds[priv->num_leds++],
208 &pdev->dev, NULL); 210 &pdev->dev, NULL);
209 if (ret < 0) { 211 if (ret < 0) {
@@ -224,6 +226,8 @@ static const struct of_device_id of_gpio_leds_match[] = {
224 { .compatible = "gpio-leds", }, 226 { .compatible = "gpio-leds", },
225 {}, 227 {},
226}; 228};
229
230MODULE_DEVICE_TABLE(of, of_gpio_leds_match);
227#else /* CONFIG_OF_GPIO */ 231#else /* CONFIG_OF_GPIO */
228static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev) 232static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev)
229{ 233{