summaryrefslogtreecommitdiff
path: root/include/dm
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2015-02-18 22:36:18 +0100
committerSimon Glass <sjg@chromium.org>2015-02-19 07:30:31 -0700
commit66c03151fc8752c29b7d17003b9c87218640b10b (patch)
treeff5a72e27bd3fd7ef1e7d2e8e9d5703aa033d491 /include/dm
parent21d004368fc8a4da07147c58dfe9a4e16d4ab761 (diff)
downloadu-boot-imx-66c03151fc8752c29b7d17003b9c87218640b10b.zip
u-boot-imx-66c03151fc8752c29b7d17003b9c87218640b10b.tar.gz
u-boot-imx-66c03151fc8752c29b7d17003b9c87218640b10b.tar.bz2
dm: Protect device_unbind() with CONFIG_DM_DEVICE_REMOVE
Since device_unbind() is also defined in device-remove.c, which is compiled in only in case CONFIG_DM_DEVICE_REMOVE is defined, protect the device_unbind() prototype with the same CONFIG_DM_DEVICE_REMOVE check. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stefan Roese <sr@denx.de> Cc: Tom Rini <trini@ti.com> Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/dm')
-rw-r--r--include/dm/device-internal.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h
index f0cc794..e2418fe 100644
--- a/include/dm/device-internal.h
+++ b/include/dm/device-internal.h
@@ -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);