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

global inline function need to be define in a header
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagnioj@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);

Hi,
2009/6/7 Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com:
global inline function need to be define in a header
Agreed, but I have a few small remarks below
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD plagnioj@jcrosoft.com
common/usb.c | 10 ---------- include/usb.h | 6 ++++++ 2 files changed, 6 insertions(+), 10 deletions(-)
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)
Please, remove the definition at line 240 as well (inline void wait_ms(unsigned long ms);) But, is there not another header better suited for a generic timer wait routine? It should not be USB specific. (Maybe common.h?)
Kind Regards,
Remy
participants (2)
-
Jean-Christophe PLAGNIOL-VILLARD
-
Remy Bohmer