From: Marek Vasut Date: Wed, 18 Feb 2015 21:36:18 +0000 (+0100) Subject: dm: Protect device_unbind() with CONFIG_DM_DEVICE_REMOVE X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=66c03151fc8752c29b7d17003b9c87218640b10b;p=u-boot.git 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 Cc: Simon Glass Cc: Stefan Roese Cc: Tom Rini Acked-by: Simon Glass --- diff --git a/include/dm/device-internal.h b/include/dm/device-internal.h index f0cc794750..e2418fedb9 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);