diff options
Diffstat (limited to 'drivers/leds/leds-gpio.c')
-rw-r--r-- | drivers/leds/leds-gpio.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index 57ff20fecf57..b4518c8751c8 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c | |||
@@ -10,17 +10,17 @@ | |||
10 | * published by the Free Software Foundation. | 10 | * published by the Free Software Foundation. |
11 | * | 11 | * |
12 | */ | 12 | */ |
13 | #include <linux/kernel.h> | 13 | #include <linux/err.h> |
14 | #include <linux/platform_device.h> | ||
15 | #include <linux/gpio.h> | 14 | #include <linux/gpio.h> |
15 | #include <linux/kernel.h> | ||
16 | #include <linux/leds.h> | 16 | #include <linux/leds.h> |
17 | #include <linux/module.h> | ||
17 | #include <linux/of.h> | 18 | #include <linux/of.h> |
18 | #include <linux/of_platform.h> | ||
19 | #include <linux/of_gpio.h> | 19 | #include <linux/of_gpio.h> |
20 | #include <linux/of_platform.h> | ||
21 | #include <linux/platform_device.h> | ||
20 | #include <linux/slab.h> | 22 | #include <linux/slab.h> |
21 | #include <linux/workqueue.h> | 23 | #include <linux/workqueue.h> |
22 | #include <linux/module.h> | ||
23 | #include <linux/err.h> | ||
24 | 24 | ||
25 | struct gpio_led_data { | 25 | struct gpio_led_data { |
26 | struct led_classdev cdev; | 26 | struct led_classdev cdev; |
@@ -36,7 +36,7 @@ struct gpio_led_data { | |||
36 | 36 | ||
37 | static void gpio_led_work(struct work_struct *work) | 37 | static void gpio_led_work(struct work_struct *work) |
38 | { | 38 | { |
39 | struct gpio_led_data *led_dat = | 39 | struct gpio_led_data *led_dat = |
40 | container_of(work, struct gpio_led_data, work); | 40 | container_of(work, struct gpio_led_data, work); |
41 | 41 | ||
42 | if (led_dat->blinking) { | 42 | if (led_dat->blinking) { |
@@ -235,14 +235,12 @@ static struct gpio_leds_priv *gpio_leds_create_of(struct platform_device *pdev) | |||
235 | } | 235 | } |
236 | #endif /* CONFIG_OF_GPIO */ | 236 | #endif /* CONFIG_OF_GPIO */ |
237 | 237 | ||
238 | |||
239 | static int gpio_led_probe(struct platform_device *pdev) | 238 | static int gpio_led_probe(struct platform_device *pdev) |
240 | { | 239 | { |
241 | struct gpio_led_platform_data *pdata = dev_get_platdata(&pdev->dev); | 240 | struct gpio_led_platform_data *pdata = dev_get_platdata(&pdev->dev); |
242 | struct gpio_leds_priv *priv; | 241 | struct gpio_leds_priv *priv; |
243 | int i, ret = 0; | 242 | int i, ret = 0; |
244 | 243 | ||
245 | |||
246 | if (pdata && pdata->num_leds) { | 244 | if (pdata && pdata->num_leds) { |
247 | priv = devm_kzalloc(&pdev->dev, | 245 | priv = devm_kzalloc(&pdev->dev, |
248 | sizeof_gpio_leds_priv(pdata->num_leds), | 246 | sizeof_gpio_leds_priv(pdata->num_leds), |