diff mbox series

[07/11] dm: core: Drop device_bind_offset()

Message ID 20201128174958.7.I9ab40479628e51e68f2efc34e6aae90ebe0b6160@changeid
State Accepted
Commit e80be7493412e0facbbf81f709dc44740e975dea
Delegated to: Simon Glass
Headers show
Series dm: Simplify livetree handling | expand

Commit Message

Simon Glass Nov. 29, 2020, 12:50 a.m. UTC
This function is not needed since the standard device_bind() can be used
instead. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/core/device.c        |  8 --------
 include/dm/device-internal.h | 10 +++-------
 2 files changed, 3 insertions(+), 15 deletions(-)

Comments

Simon Glass Dec. 10, 2020, 12:26 a.m. UTC | #1
This function is not needed since the standard device_bind() can be used
instead. Drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 drivers/core/device.c        |  8 --------
 include/dm/device-internal.h | 10 +++-------
 2 files changed, 3 insertions(+), 15 deletions(-)

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/drivers/core/device.c b/drivers/core/device.c
index c8a219d77b3..79afaf06290 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -232,14 +232,6 @@  int device_bind_with_driver_data(struct udevice *parent,
 				  0, devp);
 }
 
-int device_bind_offset(struct udevice *parent, const struct driver *drv,
-		       const char *name, void *platdata, int of_offset,
-		       struct udevice **devp)
-{
-	return device_bind_common(parent, drv, name, platdata, 0,
-				  offset_to_ofnode(of_offset), 0, devp);
-}
-
 int device_bind(struct udevice *parent, const struct driver *drv,
 		const char *name, void *platdata, ofnode node,
 		struct udevice **devp)
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index 6f4f8510f7e..578a483497e 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -16,7 +16,7 @@  struct device_node;
 struct udevice;
 
 /**
- * device_bind_offset() - Create a device and bind it to a driver
+ * device_bind() - Create a device and bind it to a driver
  *
  * Called to set up a new device attached to a driver. The device will either
  * have platdata, or a device tree node which can be used to create the
@@ -31,15 +31,11 @@  struct udevice;
  * @platdata: Pointer to data for this device - the structure is device-
  * specific but may include the device's I/O address, etc.. This is NULL for
  * devices which use device tree.
- * @of_offset: Offset of device tree node for this device. This is -1 for
- * devices which don't use device tree.
+ * @ofnode: Devicetree node for this device. This is ofnode_null() for
+ * devices which don't use devicetree or don't have a node.
  * @devp: if non-NULL, returns a pointer to the bound device
  * @return 0 if OK, -ve on error
  */
-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(struct udevice *parent, const struct driver *drv,
 		const char *name, void *platdata, ofnode node,
 		struct udevice **devp);