diff options
author | Randy Dunlap <rdunlap@xenotime.net> | 2011-10-07 16:57:42 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-10-13 13:39:29 -0400 |
commit | 56526c0b8d752bf243a21722455807518925685f (patch) | |
tree | ba5dc0935d885667e38f2de725a224a06ac84738 | |
parent | b8a56e17e18cca2402b390c10b8d7f3cd0f6265b (diff) |
usb gadget: fix langwell_udc.c build error
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
-rw-r--r-- | drivers/usb/gadget/langwell_udc.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/drivers/usb/gadget/langwell_udc.c b/drivers/usb/gadget/langwell_udc.c index c88158f307a8..cb728d3079af 100644 --- a/drivers/usb/gadget/langwell_udc.c +++ b/drivers/usb/gadget/langwell_udc.c | |||
@@ -1562,6 +1562,20 @@ static ssize_t show_function(struct device *_dev, | |||
1562 | static DEVICE_ATTR(function, S_IRUGO, show_function, NULL); | 1562 | static DEVICE_ATTR(function, S_IRUGO, show_function, NULL); |
1563 | 1563 | ||
1564 | 1564 | ||
1565 | static inline enum usb_device_speed lpm_device_speed(u32 reg) | ||
1566 | { | ||
1567 | switch (LPM_PSPD(reg)) { | ||
1568 | case LPM_SPEED_HIGH: | ||
1569 | return USB_SPEED_HIGH; | ||
1570 | case LPM_SPEED_FULL: | ||
1571 | return USB_SPEED_FULL; | ||
1572 | case LPM_SPEED_LOW: | ||
1573 | return USB_SPEED_LOW; | ||
1574 | default: | ||
1575 | return USB_SPEED_UNKNOWN; | ||
1576 | } | ||
1577 | } | ||
1578 | |||
1565 | /* device "langwell_udc" sysfs attribute file */ | 1579 | /* device "langwell_udc" sysfs attribute file */ |
1566 | static ssize_t show_langwell_udc(struct device *_dev, | 1580 | static ssize_t show_langwell_udc(struct device *_dev, |
1567 | struct device_attribute *attr, char *buf) | 1581 | struct device_attribute *attr, char *buf) |
@@ -2634,20 +2648,6 @@ done: | |||
2634 | dev_vdbg(&dev->pdev->dev, "<--- %s()\n", __func__); | 2648 | dev_vdbg(&dev->pdev->dev, "<--- %s()\n", __func__); |
2635 | } | 2649 | } |
2636 | 2650 | ||
2637 | static inline enum usb_device_speed lpm_device_speed(u32 reg) | ||
2638 | { | ||
2639 | switch (LPM_PSPD(reg)) { | ||
2640 | case LPM_SPEED_HIGH: | ||
2641 | return USB_SPEED_HIGH; | ||
2642 | case LPM_SPEED_FULL: | ||
2643 | return USB_SPEED_FULL; | ||
2644 | case LPM_SPEED_LOW: | ||
2645 | return USB_SPEED_LOW; | ||
2646 | default: | ||
2647 | return USB_SPEED_UNKNOWN; | ||
2648 | } | ||
2649 | } | ||
2650 | |||
2651 | /* port change detect interrupt handler */ | 2651 | /* port change detect interrupt handler */ |
2652 | static void handle_port_change(struct langwell_udc *dev) | 2652 | static void handle_port_change(struct langwell_udc *dev) |
2653 | { | 2653 | { |