USB: EHCI: remove usages of hcd->state
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 18 Aug 2011 20:31:30 +0000 (16:31 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 22 Aug 2011 22:57:01 +0000 (15:57 -0700)
commite8799906045302776b35b66b16495c575db3b69c
treee6b5a76bd13ef0a9df24f7a7c8c1e924c0efcedb
parentdfd8c81fd1c09c740140a2334669994d5c6edcaa
USB: EHCI: remove usages of hcd->state

This patch (as1483) improves the ehci-hcd driver family by getting rid
of the reliance on the hcd->state variable.  It has no clear owner and
it isn't protected by the usual HCD locks.  In its place, the patch
adds a new, private ehci->rh_state field to record the state of the
root hub.

Along the way, the patch removes a couple of lines containing
redundant assignments to the state variable.  Also, the QUIESCING
state simply gets changed to the RUNNING state, because the driver
doesn't make any distinction between them.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ehci-au1xxx.c
drivers/usb/host/ehci-dbg.c
drivers/usb/host/ehci-fsl.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/ehci-hub.c
drivers/usb/host/ehci-pci.c
drivers/usb/host/ehci-q.c
drivers/usb/host/ehci-s5p.c
drivers/usb/host/ehci-sched.c
drivers/usb/host/ehci.h