From: Alan Stern Date: Wed, 11 Jul 2012 15:21:09 +0000 (-0400) Subject: USB: EHCI: initialize data before resetting hardware X-Git-Tag: v3.6-rc1~101^2~49 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=631fe9d9d20e28fffdf750d12dd2cd275bd654e9;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index f9a783b..8727f4e 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) ehci->sbrn = HCD_USB2; - retval = ehci_halt(ehci); + /* data structure init */ + retval = ehci_init(hcd); if (retval) return retval; - /* data structure init */ - retval = ehci_init(hcd); + retval = ehci_halt(ehci); if (retval) return retval;