[U-Boot] [PATCH 3/3] musb_udc : Fix compile warning.

Harman Sohanpal harman_sohanpal at ti.com
Fri Jun 22 08:17:16 CEST 2012


This patch fix the compile warning :
implicit declaration of musb_platform_init
when CONFIG_MUSB_UDC is defined.
The extern musb_platform_init was declared in musb_hcd.h
but no such extern function was declared for musb_udc.
So a common function has been declared in musb_core.h
which can be used for both host mode and device mode.

Signed-off-by: Harman Sohanpal <harman_sohanpal at ti.com>
---
 drivers/usb/musb/musb_core.h |    2 ++
 drivers/usb/musb/musb_hcd.h  |    3 ---
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/musb/musb_core.h b/drivers/usb/musb/musb_core.h
index a8adcce..14253f0 100644
--- a/drivers/usb/musb/musb_core.h
+++ b/drivers/usb/musb/musb_core.h
@@ -360,6 +360,8 @@ extern void musb_start(void);
 extern void musb_configure_ep(const struct musb_epinfo *epinfo, u8 cnt);
 extern void write_fifo(u8 ep, u32 length, void *fifo_data);
 extern void read_fifo(u8 ep, u32 length, void *fifo_data);
+extern int musb_platform_init(void);
+extern void musb_platform_deinit(void);
 
 #if defined(CONFIG_USB_BLACKFIN)
 /* Every USB register is accessed as a 16-bit even if the value itself
diff --git a/drivers/usb/musb/musb_hcd.h b/drivers/usb/musb/musb_hcd.h
index dde7d37..5621f7e 100644
--- a/drivers/usb/musb/musb_hcd.h
+++ b/drivers/usb/musb/musb_hcd.h
@@ -105,8 +105,5 @@ extern unsigned char new[];
 #define RH_REQ_ERR		   -1
 #define RH_NACK			   0x00
 
-/* extern functions */
-extern int musb_platform_init(void);
-extern void musb_platform_deinit(void);
 
 #endif	/* __MUSB_HCD_H__ */
-- 
1.7.0.4



More information about the U-Boot mailing list