mirror of
https://github.com/u-boot/u-boot.git
synced 2024-12-04 01:53:27 +08:00
led: bcm6858: Drop duplicate OF "label" property parsing
The OF "label" property parsing is now handled in LED core, drop the duplicate implementation from this driver. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Alex Nemirovsky <alex.nemirovsky@cortina-access.com> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Cc: Philippe Reynes <philippe.reynes@softathome.com> Cc: Sean Anderson <seanga2@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Steven Lawrance <steven.lawrance@softathome.com>
This commit is contained in:
parent
93c3722085
commit
fec9156478
@ -241,26 +241,14 @@ static int bcm6858_led_bind(struct udevice *parent)
|
||||
ofnode node;
|
||||
|
||||
dev_for_each_subnode(node, parent) {
|
||||
struct led_uc_plat *uc_plat;
|
||||
struct udevice *dev;
|
||||
const char *label;
|
||||
int ret;
|
||||
|
||||
label = ofnode_read_string(node, "label");
|
||||
if (!label) {
|
||||
debug("%s: node %s has no label\n", __func__,
|
||||
ofnode_get_name(node));
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
ret = device_bind_driver_to_node(parent, "bcm6858-led",
|
||||
ofnode_get_name(node),
|
||||
node, &dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
uc_plat = dev_get_uclass_plat(dev);
|
||||
uc_plat->label = label;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user