]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
dm: core: Rename device_bind_ofnode() to device_bind()
authorSimon Glass <sjg@chromium.org>
Sun, 29 Nov 2020 00:50:01 +0000 (17:50 -0700)
committerSimon Glass <sjg@chromium.org>
Sun, 13 Dec 2020 14:58:18 +0000 (07:58 -0700)
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>
drivers/core/device.c
drivers/firmware/scmi/scmi_agent-uclass.c
drivers/gpio/dwapb_gpio.c
drivers/misc/i2c_eeprom.c
drivers/mtd/spi/sandbox.c
drivers/pci/pci-uclass.c
drivers/pci/pci_mvebu.c
drivers/usb/host/usb-uclass.c
include/dm/device-internal.h
test/dm/core.c

index 081dd1f7780b3e08e43d27891129d49d2299f897..c8a219d77b3939085b72d1a4b937c1a39bacf5c5 100644 (file)
@@ -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);
index 7dc533149b6e183f5bc1645b8a6eacb910a84255..b3d3f0a51b098c39b7260fde731342534abe736f 100644 (file)
@@ -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;
        }
index 37916e777164ec7a9fae5d2e4abb5cf1b6f939f2..cf20a5024e0e9a888997e51319e6761fd37e1f1f 100644 (file)
@@ -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;
 
index 3651ba4871efe49222a58dc380315c36117e43b8..92e1835625444d1a648da15d29c3dc2bcff973ce 100644 (file)
@@ -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;
index 0b602dc9140abd567445e977294c6b025d850921..1d0c1cb3fa25d81ac2d4dddd0bfb033f7b9b6ee0 100644 (file)
@@ -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",
index eb07d253011d4f0959d9714da5f9a4da79425b1b..9230cfe88b5019888b9bf2c60e46b8d7d7903295 100644 (file)
@@ -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);
index c9afe7515014dfdae4a5bbff3a93672f1d1d3b7d..ba1c139dbc568de8740a78279faeaacb009ac27c 100644 (file)
@@ -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;
index 8773824e05737fa577ff09aedec24b0b8e986633..2f8c9037c127e6ec6ee1717d02fdb9ac9906a6be 100644 (file)
@@ -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);
index 59d3be09a1e5e85a586d4efbef15f93ca5de69ee..636210f73edf01cd3775d37ab3939e2f73f2af29 100644 (file)
@@ -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
index 6f380a574cf271da9aea69f3f98fe26c13f699b9..ba9e60d09cb32b3293a495fe5852d70fa05d932b 100644 (file)
@@ -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));