mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
dm: core: Rename device_bind_ofnode() to device_bind()
This is the standard function to use when binding devices. Drop the '_ofnode' suffix to make this clear. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
e12052b322
commit
734206dda1
10 changed files with 21 additions and 21 deletions
|
@ -240,9 +240,9 @@ int device_bind_offset(struct udevice *parent, const struct driver *drv,
|
|||
offset_to_ofnode(of_offset), 0, devp);
|
||||
}
|
||||
|
||||
int device_bind_ofnode(struct udevice *parent, const struct driver *drv,
|
||||
const char *name, void *platdata, ofnode node,
|
||||
struct udevice **devp)
|
||||
int device_bind(struct udevice *parent, const struct driver *drv,
|
||||
const char *name, void *platdata, ofnode node,
|
||||
struct udevice **devp)
|
||||
{
|
||||
return device_bind_common(parent, drv, name, platdata, 0, node, 0,
|
||||
devp);
|
||||
|
|
|
@ -89,8 +89,8 @@ static int scmi_bind_protocols(struct udevice *dev)
|
|||
continue;
|
||||
}
|
||||
|
||||
ret = device_bind_ofnode(dev, drv, ofnode_get_name(node),
|
||||
NULL, node, NULL);
|
||||
ret = device_bind(dev, drv, ofnode_get_name(node), NULL, node,
|
||||
NULL);
|
||||
if (ret)
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -202,8 +202,8 @@ static int gpio_dwapb_bind(struct udevice *dev)
|
|||
}
|
||||
}
|
||||
|
||||
ret = device_bind_ofnode(dev, dev->driver, plat->name,
|
||||
plat, node, &subdev);
|
||||
ret = device_bind(dev, dev->driver, plat->name, plat, node,
|
||||
&subdev);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
|
|
@ -131,8 +131,8 @@ static int i2c_eeprom_std_bind(struct udevice *dev)
|
|||
if (!name)
|
||||
continue;
|
||||
|
||||
device_bind_ofnode(dev, DM_GET_DRIVER(i2c_eeprom_partition),
|
||||
name, NULL, partition, NULL);
|
||||
device_bind(dev, DM_GET_DRIVER(i2c_eeprom_partition), name,
|
||||
NULL, partition, NULL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -538,7 +538,7 @@ int sandbox_sf_bind_emul(struct sandbox_state *state, int busnum, int cs,
|
|||
str = strdup(name);
|
||||
if (!str)
|
||||
return -ENOMEM;
|
||||
ret = device_bind_ofnode(bus, drv, str, NULL, node, &emul);
|
||||
ret = device_bind(bus, drv, str, NULL, node, &emul);
|
||||
if (ret) {
|
||||
free(str);
|
||||
printf("Cannot create emul device for spec '%s' (err=%d)\n",
|
||||
|
|
|
@ -750,8 +750,8 @@ static int pci_find_and_bind_driver(struct udevice *parent,
|
|||
* find another driver. For now this doesn't seem
|
||||
* necesssary, so just bind the first match.
|
||||
*/
|
||||
ret = device_bind_ofnode(parent, drv, drv->name, NULL,
|
||||
node, &dev);
|
||||
ret = device_bind(parent, drv, drv->name, NULL, node,
|
||||
&dev);
|
||||
if (ret)
|
||||
goto error;
|
||||
debug("%s: Match found: %s\n", __func__, drv->name);
|
||||
|
|
|
@ -501,8 +501,8 @@ static int mvebu_pcie_bind(struct udevice *parent)
|
|||
return -ENOMEM;
|
||||
|
||||
/* Create child device UCLASS_PCI and bind it */
|
||||
device_bind_ofnode(parent, &pcie_mvebu_drv, pcie->name, pcie,
|
||||
subnode, &dev);
|
||||
device_bind(parent, &pcie_mvebu_drv, pcie->name, pcie, subnode,
|
||||
&dev);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -581,8 +581,8 @@ static int usb_find_and_bind_driver(struct udevice *parent,
|
|||
* find another driver. For now this doesn't seem
|
||||
* necesssary, so just bind the first match.
|
||||
*/
|
||||
ret = device_bind_ofnode(parent, drv, drv->name, NULL,
|
||||
node, &dev);
|
||||
ret = device_bind(parent, drv, drv->name, NULL, node,
|
||||
&dev);
|
||||
if (ret)
|
||||
goto error;
|
||||
debug("%s: Match found: %s\n", __func__, drv->name);
|
||||
|
|
|
@ -40,9 +40,9 @@ int device_bind_offset(struct udevice *parent, const struct driver *drv,
|
|||
const char *name, void *platdata, int of_offset,
|
||||
struct udevice **devp);
|
||||
|
||||
int device_bind_ofnode(struct udevice *parent, const struct driver *drv,
|
||||
const char *name, void *platdata, ofnode node,
|
||||
struct udevice **devp);
|
||||
int device_bind(struct udevice *parent, const struct driver *drv,
|
||||
const char *name, void *platdata, ofnode node,
|
||||
struct udevice **devp);
|
||||
|
||||
/**
|
||||
* device_bind_with_driver_data() - Create a device and bind it to a driver
|
||||
|
|
|
@ -1052,8 +1052,8 @@ static int dm_test_inactive_child(struct unit_test_state *uts)
|
|||
*/
|
||||
ut_asserteq(-ENODEV, device_find_first_inactive_child(parent,
|
||||
UCLASS_TEST, &dev1));
|
||||
ut_assertok(device_bind_ofnode(parent, DM_GET_DRIVER(test_drv),
|
||||
"test_child", 0, ofnode_null(), &dev1));
|
||||
ut_assertok(device_bind(parent, DM_GET_DRIVER(test_drv),
|
||||
"test_child", 0, ofnode_null(), &dev1));
|
||||
|
||||
ut_assertok(device_find_first_inactive_child(parent, UCLASS_TEST,
|
||||
&dev2));
|
||||
|
|
Loading…
Reference in a new issue