diff options
author | Olliver Schinagl <oliver@schinagl.nl> | 2015-01-21 16:33:46 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2015-03-04 07:58:58 -0500 |
commit | 1feb57a245a4910b03202a814ffc51a900bd4aca (patch) | |
tree | aa32b4a6ceb8132a7c89c4edae70ea83a7cbc1a0 /drivers/leds/leds-gpio.c | |
parent | b80eef95beb04760629822fa130aeed54cdfafca (diff) |
gpio: add parameter to allow the use named gpios
The gpio binding document says that new code should always use named
gpios. Patch 40b73183 added support to parse a list of gpios from child
nodes, but does not make it possible to use named gpios. This patch adds
the con_id property and implements it is done in gpiolib.c, where the
old-style of using unnamed gpios still works.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Bryan Wu <cooloney@gmail.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/leds/leds-gpio.c')
-rw-r--r-- | drivers/leds/leds-gpio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c index d26af0a79a90..15eb3f86f670 100644 --- a/drivers/leds/leds-gpio.c +++ b/drivers/leds/leds-gpio.c | |||
@@ -184,7 +184,7 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev) | |||
184 | struct gpio_led led = {}; | 184 | struct gpio_led led = {}; |
185 | const char *state = NULL; | 185 | const char *state = NULL; |
186 | 186 | ||
187 | led.gpiod = devm_get_gpiod_from_child(dev, child); | 187 | led.gpiod = devm_get_gpiod_from_child(dev, NULL, child); |
188 | if (IS_ERR(led.gpiod)) { | 188 | if (IS_ERR(led.gpiod)) { |
189 | fwnode_handle_put(child); | 189 | fwnode_handle_put(child); |
190 | ret = PTR_ERR(led.gpiod); | 190 | ret = PTR_ERR(led.gpiod); |