Skip to content
Commit 29470ea8 authored by Fabio Estevam's avatar Fabio Estevam Committed by Rafael J. Wysocki
Browse files

leds: leds-gpio: Fix multiple instances registration without 'label' property



Since commit a43f2cbb ("leds: leds-gpio: Make use of device property
API") it is no longer possible to register multiple gpio leds without passing
the 'label' property.

According to Documentation/devicetree/bindings/leds/common.txt:

"Optional properties for child nodes:
- label : The label for this LED.  If omitted, the label is
  taken from the node name (excluding the unit address)."

So retrieve the node name when the 'label' property is absent to keep the old
behaviour and fix this regression.

Fixes: a43f2cbb (leds: leds-gpio: Make use of device property API)
Reported-by: default avatarJean-Michel Hautbois <jean-michel.hautbois@vodalys.com>
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Acked-by: default avatarGrant Likely <grant.likely@linaro.org>
Acked-by: default avatarBryan Wu <cooloney@gmail.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent ec98a497
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment