diff options
Diffstat (limited to 'drivers/usb/host/sl811-hcd.c')
-rw-r--r-- | drivers/usb/host/sl811-hcd.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 629bca0ebe8f..df256d61e2c6 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c | |||
@@ -94,12 +94,10 @@ static void port_power(struct sl811 *sl811, int is_on) | |||
94 | 94 | ||
95 | sl811->port1 = (1 << USB_PORT_FEAT_POWER); | 95 | sl811->port1 = (1 << USB_PORT_FEAT_POWER); |
96 | sl811->irq_enable = SL11H_INTMASK_INSRMV; | 96 | sl811->irq_enable = SL11H_INTMASK_INSRMV; |
97 | hcd->self.controller->power.power_state = PMSG_ON; | ||
98 | } else { | 97 | } else { |
99 | sl811->port1 = 0; | 98 | sl811->port1 = 0; |
100 | sl811->irq_enable = 0; | 99 | sl811->irq_enable = 0; |
101 | hcd->state = HC_STATE_HALT; | 100 | hcd->state = HC_STATE_HALT; |
102 | hcd->self.controller->power.power_state = PMSG_SUSPEND; | ||
103 | } | 101 | } |
104 | sl811->ctrl1 = 0; | 102 | sl811->ctrl1 = 0; |
105 | sl811_write(sl811, SL11H_IRQ_ENABLE, 0); | 103 | sl811_write(sl811, SL11H_IRQ_ENABLE, 0); |
@@ -1772,8 +1770,6 @@ sl811h_suspend(struct platform_device *dev, pm_message_t state) | |||
1772 | port_power(sl811, 0); | 1770 | port_power(sl811, 0); |
1773 | break; | 1771 | break; |
1774 | } | 1772 | } |
1775 | if (retval == 0) | ||
1776 | dev->dev.power.power_state = state; | ||
1777 | return retval; | 1773 | return retval; |
1778 | } | 1774 | } |
1779 | 1775 | ||
@@ -1786,15 +1782,13 @@ sl811h_resume(struct platform_device *dev) | |||
1786 | /* with no "check to see if VBUS is still powered" board hook, | 1782 | /* with no "check to see if VBUS is still powered" board hook, |
1787 | * let's assume it'd only be powered to enable remote wakeup. | 1783 | * let's assume it'd only be powered to enable remote wakeup. |
1788 | */ | 1784 | */ |
1789 | if (dev->dev.power.power_state.event == PM_EVENT_SUSPEND | 1785 | if (!sl811->port1 || !device_can_wakeup(&hcd->self.root_hub->dev)) { |
1790 | || !device_can_wakeup(&hcd->self.root_hub->dev)) { | ||
1791 | sl811->port1 = 0; | 1786 | sl811->port1 = 0; |
1792 | port_power(sl811, 1); | 1787 | port_power(sl811, 1); |
1793 | usb_root_hub_lost_power(hcd->self.root_hub); | 1788 | usb_root_hub_lost_power(hcd->self.root_hub); |
1794 | return 0; | 1789 | return 0; |
1795 | } | 1790 | } |
1796 | 1791 | ||
1797 | dev->dev.power.power_state = PMSG_ON; | ||
1798 | return sl811h_bus_resume(hcd); | 1792 | return sl811h_bus_resume(hcd); |
1799 | } | 1793 | } |
1800 | 1794 | ||