public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] dm: Protect device_unbind() with CONFIG_DM_DEVICE_REMOVE
@ 2015-02-18 21:36 Marek Vasut
  2015-02-18 21:36 ` [U-Boot] [PATCH 2/2] arm: socfpga: Enable DM for Cadence and DW SPI Marek Vasut
  2015-02-19  1:06 ` [U-Boot] [PATCH 1/2] dm: Protect device_unbind() with CONFIG_DM_DEVICE_REMOVE Simon Glass
  0 siblings, 2 replies; 15+ messages in thread
From: Marek Vasut @ 2015-02-18 21:36 UTC (permalink / raw)
  To: u-boot

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>
---
 include/dm/device-internal.h | 4 ++++
 1 file changed, 4 insertions(+)

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);
-- 
2.1.3

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2015-03-05 21:00 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-18 21:36 [U-Boot] [PATCH 1/2] dm: Protect device_unbind() with CONFIG_DM_DEVICE_REMOVE Marek Vasut
2015-02-18 21:36 ` [U-Boot] [PATCH 2/2] arm: socfpga: Enable DM for Cadence and DW SPI Marek Vasut
2015-02-19  1:07   ` Simon Glass
2015-02-19  9:44     ` Marek Vasut
2015-02-19 18:28       ` Simon Glass
2015-03-05 21:00         ` Marek Vasut
2015-02-19  1:06 ` [U-Boot] [PATCH 1/2] dm: Protect device_unbind() with CONFIG_DM_DEVICE_REMOVE Simon Glass
2015-02-19  8:50   ` Marek Vasut
2015-02-19 14:29     ` Simon Glass
2015-02-19 14:34       ` Marek Vasut
2015-02-19 15:24         ` Simon Glass
2015-02-19 18:19           ` Marek Vasut
2015-02-20 19:31             ` Simon Glass
2015-03-05 21:00               ` Marek Vasut
2015-02-19 18:27   ` Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox