diff options
Diffstat (limited to 'drivers/usb/host/sl811-hcd.c')
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index d42a15d10a46..40169d9cf2b1 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -818,7 +818,7 @@ static int sl811h_urb_enqueue( | |||
818 | struct usb_hcd *hcd, | 818 | struct usb_hcd *hcd, |
819 | struct usb_host_endpoint *hep, | 819 | struct usb_host_endpoint *hep, |
820 | struct urb *urb, | 820 | struct urb *urb, |
821 | unsigned mem_flags | 821 | gfp_t mem_flags |
822 | ) { | 822 | ) { |
823 | struct sl811 *sl811 = hcd_to_sl811(hcd); | 823 | struct sl811 *sl811 = hcd_to_sl811(hcd); |
824 | struct usb_device *udev = urb->dev; | 824 | struct usb_device *udev = urb->dev; |
@@ -1363,7 +1363,7 @@ error: | |||
1363 | #ifdef CONFIG_PM | 1363 | #ifdef CONFIG_PM |
1364 | 1364 | ||
1365 | static int | 1365 | static int |
1366 | sl811h_hub_suspend(struct usb_hcd *hcd) | 1366 | sl811h_bus_suspend(struct usb_hcd *hcd) |
1367 | { | 1367 | { |
1368 | // SOFs off | 1368 | // SOFs off |
1369 | DBG("%s\n", __FUNCTION__); | 1369 | DBG("%s\n", __FUNCTION__); |
@@ -1371,7 +1371,7 @@ sl811h_hub_suspend(struct usb_hcd *hcd) | |||
1371 | } | 1371 | } |
1372 | 1372 | ||
1373 | static int | 1373 | static int |
1374 | sl811h_hub_resume(struct usb_hcd *hcd) | 1374 | sl811h_bus_resume(struct usb_hcd *hcd) |
1375 | { | 1375 | { |
1376 | // SOFs on | 1376 | // SOFs on |
1377 | DBG("%s\n", __FUNCTION__); | 1377 | DBG("%s\n", __FUNCTION__); |
@@ -1380,8 +1380,8 @@ sl811h_hub_resume(struct usb_hcd *hcd) | |||
1380 | 1380 | ||
1381 | #else | 1381 | #else |
1382 | 1382 | ||
1383 | #define sl811h_hub_suspend NULL | 1383 | #define sl811h_bus_suspend NULL |
1384 | #define sl811h_hub_resume NULL | 1384 | #define sl811h_bus_resume NULL |
1385 | 1385 | ||
1386 | #endif | 1386 | #endif |
1387 | 1387 | ||
@@ -1623,8 +1623,8 @@ static struct hc_driver sl811h_hc_driver = { | |||
1623 | */ | 1623 | */ |
1624 | .hub_status_data = sl811h_hub_status_data, | 1624 | .hub_status_data = sl811h_hub_status_data, |
1625 | .hub_control = sl811h_hub_control, | 1625 | .hub_control = sl811h_hub_control, |
1626 | .hub_suspend = sl811h_hub_suspend, | 1626 | .bus_suspend = sl811h_bus_suspend, |
1627 | .hub_resume = sl811h_hub_resume, | 1627 | .bus_resume = sl811h_bus_resume, |
1628 | }; | 1628 | }; |
1629 | 1629 | ||
1630 | /*-------------------------------------------------------------------------*/ | 1630 | /*-------------------------------------------------------------------------*/ |
@@ -1784,17 +1784,14 @@ sl811h_probe(struct device *dev) | |||
1784 | */ | 1784 | */ |
1785 | 1785 | ||
1786 | static int | 1786 | static int |
1787 | sl811h_suspend(struct device *dev, pm_message_t state, u32 phase) | 1787 | sl811h_suspend(struct device *dev, pm_message_t state) |
1788 | { | 1788 | { |
1789 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 1789 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
1790 | struct sl811 *sl811 = hcd_to_sl811(hcd); | 1790 | struct sl811 *sl811 = hcd_to_sl811(hcd); |
1791 | int retval = 0; | 1791 | int retval = 0; |
1792 | 1792 | ||
1793 | if (phase != SUSPEND_POWER_DOWN) | ||
1794 | return retval; | ||
1795 | |||
1796 | if (state.event == PM_EVENT_FREEZE) | 1793 | if (state.event == PM_EVENT_FREEZE) |
1797 | retval = sl811h_hub_suspend(hcd); | 1794 | retval = sl811h_bus_suspend(hcd); |
1798 | else if (state.event == PM_EVENT_SUSPEND) | 1795 | else if (state.event == PM_EVENT_SUSPEND) |
1799 | port_power(sl811, 0); | 1796 | port_power(sl811, 0); |
1800 | if (retval == 0) | 1797 | if (retval == 0) |
@@ -1803,14 +1800,11 @@ sl811h_suspend(struct device *dev, pm_message_t state, u32 phase) | |||
1803 | } | 1800 | } |
1804 | 1801 | ||
1805 | static int | 1802 | static int |
1806 | sl811h_resume(struct device *dev, u32 phase) | 1803 | sl811h_resume(struct device *dev) |
1807 | { | 1804 | { |
1808 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 1805 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
1809 | struct sl811 *sl811 = hcd_to_sl811(hcd); | 1806 | struct sl811 *sl811 = hcd_to_sl811(hcd); |
1810 | 1807 | ||
1811 | if (phase != RESUME_POWER_ON) | ||
1812 | return 0; | ||
1813 | |||
1814 | /* with no "check to see if VBUS is still powered" board hook, | 1808 | /* with no "check to see if VBUS is still powered" board hook, |
1815 | * let's assume it'd only be powered to enable remote wakeup. | 1809 | * let's assume it'd only be powered to enable remote wakeup. |
1816 | */ | 1810 | */ |
@@ -1822,7 +1816,7 @@ sl811h_resume(struct device *dev, u32 phase) | |||
1822 | } | 1816 | } |
1823 | 1817 | ||
1824 | dev->power.power_state = PMSG_ON; | 1818 | dev->power.power_state = PMSG_ON; |
1825 | return sl811h_hub_resume(hcd); | 1819 | return sl811h_bus_resume(hcd); |
1826 | } | 1820 | } |
1827 | 1821 | ||
1828 | #else | 1822 | #else |
@@ -1837,6 +1831,7 @@ sl811h_resume(struct device *dev, u32 phase) | |||
1837 | struct device_driver sl811h_driver = { | 1831 | struct device_driver sl811h_driver = { |
1838 | .name = (char *) hcd_name, | 1832 | .name = (char *) hcd_name, |
1839 | .bus = &platform_bus_type, | 1833 | .bus = &platform_bus_type, |
1834 | .owner = THIS_MODULE, | ||
1840 | 1835 | ||
1841 | .probe = sl811h_probe, | 1836 | .probe = sl811h_probe, |
1842 | .remove = __devexit_p(sl811h_remove), | 1837 | .remove = __devexit_p(sl811h_remove), |