[U-Boot] [PATCH 1/1] usb: fix wait_ms declaration

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sun Jun 7 13:42:38 CEST 2009


global inline function need to be define in a header

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 common/usb.c  |   10 ----------
 include/usb.h |    6 ++++++
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/common/usb.c b/common/usb.c
index 87fca70..fb6962c 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -83,16 +83,6 @@ void usb_hub_reset(void);
 static int hub_port_reset(struct usb_device *dev, int port,
 			  unsigned short *portstat);
 
-/***********************************************************************
- * wait_ms
- */
-
-inline void wait_ms(unsigned long ms)
-{
-	while (ms-- > 0)
-		udelay(1000);
-}
-
 /***************************************************************************
  * Init USB Device
  */
diff --git a/include/usb.h b/include/usb.h
index 7c47098..a181e0e 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -242,6 +242,12 @@ int usb_get_configuration_no(struct usb_device *dev, unsigned char *buffer,
 				int cfgno);
 int usb_get_report(struct usb_device *dev, int ifnum, unsigned char type,
 			unsigned char id, void *buf, int size);
+static void __inline__ wait_ms(unsigned long ms)
+{
+	while(ms-- > 0)
+		udelay(1000);
+}
+
 int usb_get_class_descriptor(struct usb_device *dev, int ifnum,
 			unsigned char type, unsigned char id, void *buf,
 			int size);
-- 
1.6.3.1



More information about the U-Boot mailing list