USB: ehci-au1xxx: fix suspend callback
Remove a stray 'return 0' at the top of the suspend callback, and move au1xxx_stop_ehc() out of the ehci spinlock since it takes some time to complete. Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
3df0045325
commit
a7535ac054
@ -216,10 +216,7 @@ static int ehci_hcd_au1xxx_drv_suspend(struct device *dev)
|
|||||||
struct usb_hcd *hcd = dev_get_drvdata(dev);
|
struct usb_hcd *hcd = dev_get_drvdata(dev);
|
||||||
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
|
struct ehci_hcd *ehci = hcd_to_ehci(hcd);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int rc;
|
int rc = 0;
|
||||||
|
|
||||||
return 0;
|
|
||||||
rc = 0;
|
|
||||||
|
|
||||||
if (time_before(jiffies, ehci->next_statechange))
|
if (time_before(jiffies, ehci->next_statechange))
|
||||||
msleep(10);
|
msleep(10);
|
||||||
@ -234,13 +231,13 @@ static int ehci_hcd_au1xxx_drv_suspend(struct device *dev)
|
|||||||
(void)ehci_readl(ehci, &ehci->regs->intr_enable);
|
(void)ehci_readl(ehci, &ehci->regs->intr_enable);
|
||||||
|
|
||||||
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
|
clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
|
||||||
|
|
||||||
au1xxx_stop_ehc();
|
|
||||||
spin_unlock_irqrestore(&ehci->lock, flags);
|
spin_unlock_irqrestore(&ehci->lock, flags);
|
||||||
|
|
||||||
// could save FLADJ in case of Vaux power loss
|
// could save FLADJ in case of Vaux power loss
|
||||||
// ... we'd only use it to handle clock skew
|
// ... we'd only use it to handle clock skew
|
||||||
|
|
||||||
|
au1xxx_stop_ehc();
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user