Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333078
b: refs/heads/master
c: 8fe4554
h: refs/heads/master
v: v3
  • Loading branch information
AnilKumar Ch authored and Bryan Wu committed Sep 11, 2012
1 parent 7d2286f commit 921b542
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b98d13c725920e9ab7696e0d7d19c4db1bdf6737
refs/heads/master: 8fe4554f675c5822a0e12382e6843965ffd11c30
7 changes: 7 additions & 0 deletions trunk/drivers/leds/leds-gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>

struct gpio_led_data {
struct led_classdev cdev;
Expand Down Expand Up @@ -234,8 +235,14 @@ static int __devinit gpio_led_probe(struct platform_device *pdev)
{
struct gpio_led_platform_data *pdata = pdev->dev.platform_data;
struct gpio_leds_priv *priv;
struct pinctrl *pinctrl;
int i, ret = 0;

pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
if (IS_ERR(pinctrl))
dev_warn(&pdev->dev,
"pins are not configured from the driver\n");

if (pdata && pdata->num_leds) {
priv = devm_kzalloc(&pdev->dev,
sizeof_gpio_leds_priv(pdata->num_leds),
Expand Down

0 comments on commit 921b542

Please sign in to comment.