mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
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>
This commit is contained in:
parent
21d004368f
commit
66c03151fc
1 changed files with 4 additions and 0 deletions
|
@ -101,7 +101,11 @@ static inline int device_remove(struct udevice *dev) { return 0; }
|
||||||
* @dev: Pointer to device to unbind
|
* @dev: Pointer to device to unbind
|
||||||
* @return 0 if OK, -ve on error
|
* @return 0 if OK, -ve on error
|
||||||
*/
|
*/
|
||||||
|
#ifdef CONFIG_DM_DEVICE_REMOVE
|
||||||
int device_unbind(struct udevice *dev);
|
int device_unbind(struct udevice *dev);
|
||||||
|
#else
|
||||||
|
static inline int device_unbind(struct udevice *dev) { return 0; }
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DM_DEVICE_REMOVE
|
#ifdef CONFIG_DM_DEVICE_REMOVE
|
||||||
void device_free(struct udevice *dev);
|
void device_free(struct udevice *dev);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue