mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-28 23:50:26 +09:00
led: gpio: Default to using node name if label is absent
This more closely mirrors Linux's behaviour, and will make it easier to transition to using function+color in the future. Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
b4167aa15a
commit
aaa3645e16
@ -99,11 +99,8 @@ static int led_gpio_bind(struct udevice *parent)
|
|||||||
const char *label;
|
const char *label;
|
||||||
|
|
||||||
label = ofnode_read_string(node, "label");
|
label = ofnode_read_string(node, "label");
|
||||||
if (!label) {
|
if (!label)
|
||||||
debug("%s: node %s has no label\n", __func__,
|
label = ofnode_get_name(node);
|
||||||
ofnode_get_name(node));
|
|
||||||
return -EINVAL;
|
|
||||||
}
|
|
||||||
ret = device_bind_driver_to_node(parent, "gpio_led",
|
ret = device_bind_driver_to_node(parent, "gpio_led",
|
||||||
ofnode_get_name(node),
|
ofnode_get_name(node),
|
||||||
node, &dev);
|
node, &dev);
|
||||||
|
Loading…
Reference in New Issue
Block a user