]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - include/dm/uclass-internal.h
karo: tx28: enable 'gpio' command
[karo-tx-uboot.git] / include / dm / uclass-internal.h
index 153f2a7626f7d44ec0dc7b40e3a9202f169165ed..b51e1da5c14a02d9e07ec7b4335632f4480a6be6 100644 (file)
@@ -63,7 +63,7 @@ int uclass_find_next_device(struct udevice **devp);
 /**
  * uclass_find_device_by_name() - Find uclass device based on ID and name
  *
- * This searches for a device with the given name.
+ * This searches for a device with the exactly given name.
  *
  * The device is NOT probed, it is merely returned.
  *
@@ -116,7 +116,11 @@ int uclass_bind_device(struct udevice *dev);
  * @dev:       Pointer to the device
  * #return 0 on success, -ve on error
  */
+#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
 int uclass_unbind_device(struct udevice *dev);
+#else
+static inline int uclass_unbind_device(struct udevice *dev) { return 0; }
+#endif
 
 /**
  * uclass_pre_probe_device() - Deal with a device that is about to be probed
@@ -149,7 +153,11 @@ int uclass_post_probe_device(struct udevice *dev);
  * @dev:       Pointer to the device
  * #return 0 on success, -ve on error
  */
+#if CONFIG_IS_ENABLED(DM_DEVICE_REMOVE)
 int uclass_pre_remove_device(struct udevice *dev);
+#else
+static inline int uclass_pre_remove_device(struct udevice *dev) { return 0; }
+#endif
 
 /**
  * uclass_find() - Find uclass by its id