]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/dm/device-internal.h
dm: Protect device_unbind() with CONFIG_DM_DEVICE_REMOVE
[karo-tx-uboot.git] / include / dm / device-internal.h
index f0cc7947505176907677840bd47554b8a22973c6..e2418fedb976deb9d57ed13a350a26d9ab7190eb 100644 (file)
@@ -101,7 +101,11 @@ static inline int device_remove(struct udevice *dev) { return 0; }
  * @dev: Pointer to device to unbind
  * @return 0 if OK, -ve on error
  */
+#ifdef CONFIG_DM_DEVICE_REMOVE
 int device_unbind(struct udevice *dev);
+#else
+static inline int device_unbind(struct udevice *dev) { return 0; }
+#endif
 
 #ifdef CONFIG_DM_DEVICE_REMOVE
 void device_free(struct udevice *dev);