From: Andrew Morton avoid sleep-in-spinlock. Cc: Greg KH Cc: Mattia Dongili Cc: Stuart Hayes Cc: David Brownell Signed-off-by: Andrew Morton --- drivers/usb/host/ehci-hcd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff -puN drivers/usb/host/ehci-hcd.c~fix-gregkh-usb-usb-ehci-cpufreq-fix drivers/usb/host/ehci-hcd.c --- a/drivers/usb/host/ehci-hcd.c~fix-gregkh-usb-usb-ehci-cpufreq-fix +++ a/drivers/usb/host/ehci-hcd.c @@ -452,14 +452,14 @@ static void ehci_stop (struct usb_hcd *h if (HC_IS_RUNNING (hcd->state)) ehci_quiesce (ehci); -#ifdef CONFIG_CPU_FREQ - cpufreq_unregister_notifier(&ehci->cpufreq_transition, - CPUFREQ_TRANSITION_NOTIFIER); -#endif ehci_reset (ehci); ehci_writel(ehci, 0, &ehci->regs->intr_enable); spin_unlock_irq(&ehci->lock); +#ifdef CONFIG_CPU_FREQ + cpufreq_unregister_notifier(&ehci->cpufreq_transition, + CPUFREQ_TRANSITION_NOTIFIER); +#endif /* let companion controllers work when we aren't */ ehci_writel(ehci, 0, &ehci->regs->configured_flag); _