aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-hub.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2011-11-17 16:41:56 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-18 13:51:00 -0500
commitb7463c71fbbff7111d0c879d2f64fe2b08f51848 (patch)
tree4d5b69827f602a5c590cf75d5702260fc379d6f6 /drivers/usb/host/ohci-hub.c
parentc6249ff7521c0211e9daa37f07a4c016a5c4d454 (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-hub.c')
-rw-r--r--drivers/usb/host/ohci-hub.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 2f00040fc408..836772dfabd3 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -111,6 +111,7 @@ __acquires(ohci->lock)
111 if (!autostop) { 111 if (!autostop) {
112 ohci->next_statechange = jiffies + msecs_to_jiffies (5); 112 ohci->next_statechange = jiffies + msecs_to_jiffies (5);
113 ohci->autostop = 0; 113 ohci->autostop = 0;
114 ohci->rh_state = OHCI_RH_SUSPENDED;
114 } 115 }
115 116
116done: 117done:
@@ -140,7 +141,7 @@ __acquires(ohci->lock)
140 141
141 if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) { 142 if (ohci->hc_control & (OHCI_CTRL_IR | OHCI_SCHED_ENABLES)) {
142 /* this can happen after resuming a swsusp snapshot */ 143 /* this can happen after resuming a swsusp snapshot */
143 if (hcd->state == HC_STATE_RESUMING) { 144 if (ohci->rh_state != OHCI_RH_RUNNING) {
144 ohci_dbg (ohci, "BIOS/SMM active, control %03x\n", 145 ohci_dbg (ohci, "BIOS/SMM active, control %03x\n",
145 ohci->hc_control); 146 ohci->hc_control);
146 status = -EBUSY; 147 status = -EBUSY;
@@ -274,6 +275,7 @@ skip_resume:
274 (void) ohci_readl (ohci, &ohci->regs->control); 275 (void) ohci_readl (ohci, &ohci->regs->control);
275 } 276 }
276 277
278 ohci->rh_state = OHCI_RH_RUNNING;
277 return 0; 279 return 0;
278} 280}
279 281
@@ -336,11 +338,8 @@ static void ohci_finish_controller_resume(struct usb_hcd *hcd)
336 /* If needed, reinitialize and suspend the root hub */ 338 /* If needed, reinitialize and suspend the root hub */
337 if (need_reinit) { 339 if (need_reinit) {
338 spin_lock_irq(&ohci->lock); 340 spin_lock_irq(&ohci->lock);
339 hcd->state = HC_STATE_RESUMING;
340 ohci_rh_resume(ohci); 341 ohci_rh_resume(ohci);
341 hcd->state = HC_STATE_QUIESCING;
342 ohci_rh_suspend(ohci, 0); 342 ohci_rh_suspend(ohci, 0);
343 hcd->state = HC_STATE_SUSPENDED;
344 spin_unlock_irq(&ohci->lock); 343 spin_unlock_irq(&ohci->lock);
345 } 344 }
346 345