aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-07-11 11:21:09 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-16 19:50:12 -0400
commit631fe9d9d20e28fffdf750d12dd2cd275bd654e9 (patch)
tree83b560cbf25a7e3cdf60b8e80b2d1c174ba8f172 /drivers
parent1f9be64a6de34f8d4a2dce845af15063523a02e3 (diff)
USB: EHCI: initialize data before resetting hardware
Currently, EHCI initialization turns off the controller (in case it was left running by the firmware) before setting up the ehci_hcd data structure. This patch (as1565) reverses that order. Although it doesn't matter now, it will matter later on when future additions to ehci_halt() will want to acquire a spinlock that gets initialized by ehci_init(). Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/ehci-hcd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c
index f9a783bfa1fe..8727f4ea343f 100644
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -823,12 +823,12 @@ static int ehci_setup(struct usb_hcd *hcd)
823 823
824 ehci->sbrn = HCD_USB2; 824 ehci->sbrn = HCD_USB2;
825 825
826 retval = ehci_halt(ehci); 826 /* data structure init */
827 retval = ehci_init(hcd);
827 if (retval) 828 if (retval)
828 return retval; 829 return retval;
829 830
830 /* data structure init */ 831 retval = ehci_halt(ehci);
831 retval = ehci_init(hcd);
832 if (retval) 832 if (retval)
833 return retval; 833 return retval;
834 834