summaryrefslogtreecommitdiff
path: root/drivers/leds/leds-gpio.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-07-27 14:03:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-07-27 14:03:52 -0700
commit607e11ab6654e167b1b0ec132cedc73e220f63c6 (patch)
treedd6f011b69046ef2ec7b2a8c1c9a142ee531e2a3 /drivers/leds/leds-gpio.c
parent78d51aee04cd20f540c78f1f98f0f9a762ab697a (diff)
parent5706c01fcfb313cef7aed6a283b43c5452cf8336 (diff)
downloadlinux-next-607e11ab6654e167b1b0ec132cedc73e220f63c6.tar.gz
Merge tag 'leds_for_4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds
Pull LED updates from Jacek Anaszewski: "New LED class driver: - LED driver for TI LP3952 6-Channel Color LED LED core improvements: - Only descend into leds directory when CONFIG_NEW_LEDS is set - Add no-op gpio_led_register_device when LED subsystem is disabled - MAINTAINERS: Add file patterns for led device tree bindings LED Trigger core improvements: - return error if invalid trigger name is provided via sysfs LED class drivers improvements - is31fl32xx: define complete i2c_device_id table - is31fl32xx: fix typo in id and match table names - leds-gpio: Set of_node for created LED devices - pca9532: Add device tree support Conversion of IDE trigger to common disk trigger: - leds: convert IDE trigger to common disk trigger - leds: documentation: 'ide-disk' to 'disk-activity' - unicore32: use the new LED disk activity trigger - parisc: use the new LED disk activity trigger - mips: use the new LED disk activity trigger - arm: use the new LED disk activity trigger - powerpc: use the new LED disk activity trigger" * tag 'leds_for_4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds: leds: is31fl32xx: define complete i2c_device_id table leds: is31fl32xx: fix typo in id and match table names leds: LED driver for TI LP3952 6-Channel Color LED leds: leds-gpio: Set of_node for created LED devices leds: triggers: return error if invalid trigger name is provided via sysfs leds: Only descend into leds directory when CONFIG_NEW_LEDS is set leds: Add no-op gpio_led_register_device when LED subsystem is disabled unicore32: use the new LED disk activity trigger parisc: use the new LED disk activity trigger mips: use the new LED disk activity trigger arm: use the new LED disk activity trigger powerpc: use the new LED disk activity trigger leds: documentation: 'ide-disk' to 'disk-activity' leds: convert IDE trigger to common disk trigger leds: pca9532: Add device tree support MAINTAINERS: Add file patterns for led device tree bindings
Diffstat (limited to 'drivers/leds/leds-gpio.c')
-rw-r--r--drivers/leds/leds-gpio.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/leds/leds-gpio.c b/drivers/leds/leds-gpio.c
index 8229f063b483..9b991d46ed84 100644
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -165,6 +165,7 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)
return ERR_PTR(-ENOMEM);
device_for_each_child_node(dev, child) {
+ struct gpio_led_data *led_dat = &priv->leds[priv->num_leds];
struct gpio_led led = {};
const char *state = NULL;
@@ -205,12 +206,12 @@ static struct gpio_leds_priv *gpio_leds_create(struct platform_device *pdev)
if (fwnode_property_present(child, "panic-indicator"))
led.panic_indicator = 1;
- ret = create_gpio_led(&led, &priv->leds[priv->num_leds],
- dev, NULL);
+ ret = create_gpio_led(&led, led_dat, dev, NULL);
if (ret < 0) {
fwnode_handle_put(child);
goto err;
}
+ led_dat->cdev.dev->of_node = np;
priv->num_leds++;
}