diff options
Diffstat (limited to 'drivers/led')
-rw-r--r-- | drivers/led/led_bcm6328.c | 2 | ||||
-rw-r--r-- | drivers/led/led_bcm6358.c | 2 | ||||
-rw-r--r-- | drivers/led/led_gpio.c | 13 |
3 files changed, 7 insertions, 10 deletions
diff --git a/drivers/led/led_bcm6328.c b/drivers/led/led_bcm6328.c index fa7c6d16d59..5d545c50960 100644 --- a/drivers/led/led_bcm6328.c +++ b/drivers/led/led_bcm6328.c @@ -236,7 +236,7 @@ static int bcm6328_led_bind(struct udevice *parent) ret = device_bind_driver_to_node(parent, "bcm6328-led", fdt_get_name(blob, node, NULL), - node, &dev); + offset_to_ofnode(node), &dev); if (ret) return ret; diff --git a/drivers/led/led_bcm6358.c b/drivers/led/led_bcm6358.c index a9a194b0e18..e8a3b64e686 100644 --- a/drivers/led/led_bcm6358.c +++ b/drivers/led/led_bcm6358.c @@ -201,7 +201,7 @@ static int bcm6358_led_bind(struct udevice *parent) ret = device_bind_driver_to_node(parent, "bcm6358-led", fdt_get_name(blob, node, NULL), - node, &dev); + offset_to_ofnode(node), &dev); if (ret) return ret; diff --git a/drivers/led/led_gpio.c b/drivers/led/led_gpio.c index 4106ecb6799..99766358871 100644 --- a/drivers/led/led_gpio.c +++ b/drivers/led/led_gpio.c @@ -85,25 +85,22 @@ static int led_gpio_remove(struct udevice *dev) static int led_gpio_bind(struct udevice *parent) { - const void *blob = gd->fdt_blob; struct udevice *dev; - int node; + ofnode node; int ret; - for (node = fdt_first_subnode(blob, dev_of_offset(parent)); - node > 0; - node = fdt_next_subnode(blob, node)) { + dev_for_each_subnode(node, parent) { struct led_uc_plat *uc_plat; const char *label; - label = fdt_getprop(blob, node, "label", NULL); + label = ofnode_read_string(node, "label"); if (!label) { debug("%s: node %s has no label\n", __func__, - fdt_get_name(blob, node, NULL)); + ofnode_get_name(node)); return -EINVAL; } ret = device_bind_driver_to_node(parent, "gpio_led", - fdt_get_name(blob, node, NULL), + ofnode_get_name(node), node, &dev); if (ret) return ret; |