diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2011-11-17 16:41:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 13:51:00 -0500 |
commit | b7463c71fbbff7111d0c879d2f64fe2b08f51848 (patch) | |
tree | 4d5b69827f602a5c590cf75d5702260fc379d6f6 /drivers/usb/host/ohci-pci.c | |
parent | c6249ff7521c0211e9daa37f07a4c016a5c4d454 (diff) |
OHCI: remove uses of hcd->state
This patch (as1500) removes all uses of the objectionable hcd->state
variable from the ohci-hcd family of drivers. It is replaced by a
private ohci->rh_state field, just as in uhci-hcd and ehci-hcd.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/ohci-pci.c')
-rw-r--r-- | drivers/usb/host/ohci-pci.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index ad8166c681e2..847187df50a1 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c | |||
@@ -334,12 +334,9 @@ static int ohci_pci_suspend(struct usb_hcd *hcd, bool do_wakeup) | |||
334 | * mark HW unaccessible, bail out if RH has been resumed. Use | 334 | * mark HW unaccessible, bail out if RH has been resumed. Use |
335 | * the spinlock to properly synchronize with possible pending | 335 | * the spinlock to properly synchronize with possible pending |
336 | * RH suspend or resume activity. | 336 | * RH suspend or resume activity. |
337 | * | ||
338 | * This is still racy as hcd->state is manipulated outside of | ||
339 | * any locks =P But that will be a different fix. | ||
340 | */ | 337 | */ |
341 | spin_lock_irqsave (&ohci->lock, flags); | 338 | spin_lock_irqsave (&ohci->lock, flags); |
342 | if (hcd->state != HC_STATE_SUSPENDED) { | 339 | if (ohci->rh_state != OHCI_RH_SUSPENDED) { |
343 | rc = -EINVAL; | 340 | rc = -EINVAL; |
344 | goto bail; | 341 | goto bail; |
345 | } | 342 | } |