diff options
Diffstat (limited to 'drivers/usb/host')
-rw-r--r-- | drivers/usb/host/isp116x-hcd.c | 14 | ||||
-rw-r--r-- | drivers/usb/host/ohci-omap.c | 10 | ||||
-rw-r--r-- | drivers/usb/host/ohci-pxa27x.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 10 |
4 files changed, 10 insertions, 28 deletions
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c index e142056b0d2c..0f6183a829c4 100644 --- a/drivers/usb/host/isp116x-hcd.c +++ b/drivers/usb/host/isp116x-hcd.c | |||
@@ -1774,15 +1774,12 @@ static int __init isp116x_probe(struct device *dev) | |||
1774 | /* | 1774 | /* |
1775 | Suspend of platform device | 1775 | Suspend of platform device |
1776 | */ | 1776 | */ |
1777 | static int isp116x_suspend(struct device *dev, pm_message_t state, u32 phase) | 1777 | static int isp116x_suspend(struct device *dev, pm_message_t state) |
1778 | { | 1778 | { |
1779 | int ret = 0; | 1779 | int ret = 0; |
1780 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 1780 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
1781 | 1781 | ||
1782 | VDBG("%s: state %x, phase %x\n", __func__, state, phase); | 1782 | VDBG("%s: state %x\n", __func__, state); |
1783 | |||
1784 | if (phase != SUSPEND_DISABLE && phase != SUSPEND_POWER_DOWN) | ||
1785 | return 0; | ||
1786 | 1783 | ||
1787 | ret = usb_suspend_device(hcd->self.root_hub, state); | 1784 | ret = usb_suspend_device(hcd->self.root_hub, state); |
1788 | if (!ret) { | 1785 | if (!ret) { |
@@ -1797,15 +1794,12 @@ static int isp116x_suspend(struct device *dev, pm_message_t state, u32 phase) | |||
1797 | /* | 1794 | /* |
1798 | Resume platform device | 1795 | Resume platform device |
1799 | */ | 1796 | */ |
1800 | static int isp116x_resume(struct device *dev, u32 phase) | 1797 | static int isp116x_resume(struct device *dev) |
1801 | { | 1798 | { |
1802 | int ret = 0; | 1799 | int ret = 0; |
1803 | struct usb_hcd *hcd = dev_get_drvdata(dev); | 1800 | struct usb_hcd *hcd = dev_get_drvdata(dev); |
1804 | 1801 | ||
1805 | VDBG("%s: state %x, phase %x\n", __func__, dev->power.power_state, | 1802 | VDBG("%s: state %x\n", __func__, dev->power.power_state); |
1806 | phase); | ||
1807 | if (phase != RESUME_POWER_ON) | ||
1808 | return 0; | ||
1809 | 1803 | ||
1810 | ret = usb_resume_device(hcd->self.root_hub); | 1804 | ret = usb_resume_device(hcd->self.root_hub); |
1811 | if (!ret) { | 1805 | if (!ret) { |
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index d8f3ba7ad52e..a574216625a0 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -455,14 +455,11 @@ static int ohci_hcd_omap_drv_remove(struct device *dev) | |||
455 | 455 | ||
456 | #ifdef CONFIG_PM | 456 | #ifdef CONFIG_PM |
457 | 457 | ||
458 | static int ohci_omap_suspend(struct device *dev, pm_message_t message, u32 level) | 458 | static int ohci_omap_suspend(struct device *dev, pm_message_t message) |
459 | { | 459 | { |
460 | struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); | 460 | struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); |
461 | int status = -EINVAL; | 461 | int status = -EINVAL; |
462 | 462 | ||
463 | if (level != SUSPEND_POWER_DOWN) | ||
464 | return 0; | ||
465 | |||
466 | down(&ohci_to_hcd(ohci)->self.root_hub->serialize); | 463 | down(&ohci_to_hcd(ohci)->self.root_hub->serialize); |
467 | status = ohci_hub_suspend(ohci_to_hcd(ohci)); | 464 | status = ohci_hub_suspend(ohci_to_hcd(ohci)); |
468 | if (status == 0) { | 465 | if (status == 0) { |
@@ -476,14 +473,11 @@ static int ohci_omap_suspend(struct device *dev, pm_message_t message, u32 level | |||
476 | return status; | 473 | return status; |
477 | } | 474 | } |
478 | 475 | ||
479 | static int ohci_omap_resume(struct device *dev, u32 level) | 476 | static int ohci_omap_resume(struct device *dev) |
480 | { | 477 | { |
481 | struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); | 478 | struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); |
482 | int status = 0; | 479 | int status = 0; |
483 | 480 | ||
484 | if (level != RESUME_POWER_ON) | ||
485 | return 0; | ||
486 | |||
487 | if (time_before(jiffies, ohci->next_statechange)) | 481 | if (time_before(jiffies, ohci->next_statechange)) |
488 | msleep(5); | 482 | msleep(5); |
489 | ohci->next_statechange = jiffies; | 483 | ohci->next_statechange = jiffies; |
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index 2fdb262d4726..f042261ecb8e 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
@@ -309,7 +309,7 @@ static int ohci_hcd_pxa27x_drv_remove(struct device *dev) | |||
309 | return 0; | 309 | return 0; |
310 | } | 310 | } |
311 | 311 | ||
312 | static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, pm_message_t state, u32 level) | 312 | static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, pm_message_t state) |
313 | { | 313 | { |
314 | // struct platform_device *pdev = to_platform_device(dev); | 314 | // struct platform_device *pdev = to_platform_device(dev); |
315 | // struct usb_hcd *hcd = dev_get_drvdata(dev); | 315 | // struct usb_hcd *hcd = dev_get_drvdata(dev); |
@@ -318,7 +318,7 @@ static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, pm_message_t state, u | |||
318 | return 0; | 318 | return 0; |
319 | } | 319 | } |
320 | 320 | ||
321 | static int ohci_hcd_pxa27x_drv_resume(struct device *dev, u32 level) | 321 | static int ohci_hcd_pxa27x_drv_resume(struct device *dev) |
322 | { | 322 | { |
323 | // struct platform_device *pdev = to_platform_device(dev); | 323 | // struct platform_device *pdev = to_platform_device(dev); |
324 | // struct usb_hcd *hcd = dev_get_drvdata(dev); | 324 | // struct usb_hcd *hcd = dev_get_drvdata(dev); |
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index d42a15d10a46..03cf6accfe64 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -1784,15 +1784,12 @@ 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_hub_suspend(hcd); |
1798 | else if (state.event == PM_EVENT_SUSPEND) | 1795 | else if (state.event == PM_EVENT_SUSPEND) |
@@ -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 | */ |