Re: [PATCH 02/11] dm: core: Rename device_bind_ofnode() to device_bind()

2020-12-09 Thread Simon Glass
This is the standard function to use when binding devices. Drop the
'_ofnode' suffix to make this clear.

Signed-off-by: Simon Glass 
---

 drivers/core/device.c | 6 +++---
 drivers/firmware/scmi/scmi_agent-uclass.c | 4 ++--
 drivers/gpio/dwapb_gpio.c | 4 ++--
 drivers/misc/i2c_eeprom.c | 4 ++--
 drivers/mtd/spi/sandbox.c | 2 +-
 drivers/pci/pci-uclass.c  | 4 ++--
 drivers/pci/pci_mvebu.c   | 4 ++--
 drivers/usb/host/usb-uclass.c | 4 ++--
 include/dm/device-internal.h  | 6 +++---
 test/dm/core.c| 4 ++--
 10 files changed, 21 insertions(+), 21 deletions(-)

Applied to u-boot-dm, thanks!


[PATCH 02/11] dm: core: Rename device_bind_ofnode() to device_bind()

2020-11-28 Thread Simon Glass
This is the standard function to use when binding devices. Drop the
'_ofnode' suffix to make this clear.

Signed-off-by: Simon Glass 
---

 drivers/core/device.c | 6 +++---
 drivers/firmware/scmi/scmi_agent-uclass.c | 4 ++--
 drivers/gpio/dwapb_gpio.c | 4 ++--
 drivers/misc/i2c_eeprom.c | 4 ++--
 drivers/mtd/spi/sandbox.c | 2 +-
 drivers/pci/pci-uclass.c  | 4 ++--
 drivers/pci/pci_mvebu.c   | 4 ++--
 drivers/usb/host/usb-uclass.c | 4 ++--
 include/dm/device-internal.h  | 6 +++---
 test/dm/core.c| 4 ++--
 10 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/drivers/core/device.c b/drivers/core/device.c
index 081dd1f7780..c8a219d77b3 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -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);
diff --git a/drivers/firmware/scmi/scmi_agent-uclass.c 
b/drivers/firmware/scmi/scmi_agent-uclass.c
index 7dc533149b6..b3d3f0a51b0 100644
--- a/drivers/firmware/scmi/scmi_agent-uclass.c
+++ b/drivers/firmware/scmi/scmi_agent-uclass.c
@@ -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;
}
diff --git a/drivers/gpio/dwapb_gpio.c b/drivers/gpio/dwapb_gpio.c
index 37916e77716..cf20a5024e0 100644
--- a/drivers/gpio/dwapb_gpio.c
+++ b/drivers/gpio/dwapb_gpio.c
@@ -202,8 +202,8 @@ static int gpio_dwapb_bind(struct udevice *dev)
}
}
 
-   ret = device_bind_ofnode(dev, dev->driver, plat->name,
-plat, node, );
+   ret = device_bind(dev, dev->driver, plat->name, plat, node,
+ );
if (ret)
return ret;
 
diff --git a/drivers/misc/i2c_eeprom.c b/drivers/misc/i2c_eeprom.c
index 3651ba4871e..92e18356254 100644
--- a/drivers/misc/i2c_eeprom.c
+++ b/drivers/misc/i2c_eeprom.c
@@ -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;
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c
index 0b602dc9140..1d0c1cb3fa2 100644
--- a/drivers/mtd/spi/sandbox.c
+++ b/drivers/mtd/spi/sandbox.c
@@ -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, );
+   ret = device_bind(bus, drv, str, NULL, node, );
if (ret) {
free(str);
printf("Cannot create emul device for spec '%s' (err=%d)\n",
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index eb07d253011..9230cfe88b5 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -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, );
+   ret = device_bind(parent, drv, drv->name, NULL, node,
+ );
if (ret)
goto error;
debug("%s: Match found: %s\n", __func__, drv->name);
diff --git a/drivers/pci/pci_mvebu.c b/drivers/pci/pci_mvebu.c
index c9afe751501..ba1c139dbc5 100644
--- a/drivers/pci/pci_mvebu.c
+++ b/drivers/pci/pci_mvebu.c
@@ -501,8 +501,8 @@ static int