usb gadget: fix langwell_udc.c build error
authorRandy Dunlap <rdunlap@xenotime.net>
Fri, 7 Oct 2011 20:57:42 +0000 (13:57 -0700)
committerFelipe Balbi <balbi@ti.com>
Thu, 13 Oct 2011 17:39:29 +0000 (20:39 +0300)
Move function to fix langwell_udc.c build error:

drivers/usb/gadget/langwell_udc.c: In function 'show_langwell_udc':
drivers/usb/gadget/langwell_udc.c:1693:3: error: implicit declaration of function 'lpm_device_speed'
drivers/usb/gadget/langwell_udc.c: At top level:
drivers/usb/gadget/langwell_udc.c:2637:37: error: conflicting types for 'lpm_device_speed'
drivers/usb/gadget/langwell_udc.c:1693:20: note: previous implicit declaration of 'lpm_device_speed' was here

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Felipe Balbi <balbi@ti.com>
Cc: linux-usb@vger.kernel.org

drivers/usb/gadget/langwell_udc.c

index c88158f307a89d9c893fa8f651ad749352e4f8d7..cb728d3079aff0f73b90c1ec582b701c59c0eb03 100644 (file)
@@ -1562,6 +1562,20 @@ static ssize_t show_function(struct device *_dev,
 static DEVICE_ATTR(function, S_IRUGO, show_function, NULL);
 
 
+static inline enum usb_device_speed lpm_device_speed(u32 reg)
+{
+       switch (LPM_PSPD(reg)) {
+       case LPM_SPEED_HIGH:
+               return USB_SPEED_HIGH;
+       case LPM_SPEED_FULL:
+               return USB_SPEED_FULL;
+       case LPM_SPEED_LOW:
+               return USB_SPEED_LOW;
+       default:
+               return USB_SPEED_UNKNOWN;
+       }
+}
+
 /* device "langwell_udc" sysfs attribute file */
 static ssize_t show_langwell_udc(struct device *_dev,
                struct device_attribute *attr, char *buf)
@@ -2634,20 +2648,6 @@ done:
        dev_vdbg(&dev->pdev->dev, "<--- %s()\n", __func__);
 }
 
-static inline enum usb_device_speed lpm_device_speed(u32 reg)
-{
-       switch (LPM_PSPD(reg)) {
-       case LPM_SPEED_HIGH:
-               return USB_SPEED_HIGH;
-       case LPM_SPEED_FULL:
-               return USB_SPEED_FULL;
-       case LPM_SPEED_LOW:
-               return USB_SPEED_LOW;
-       default:
-               return USB_SPEED_UNKNOWN;
-       }
-}
-
 /* port change detect interrupt handler */
 static void handle_port_change(struct langwell_udc *dev)
 {