aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-fsl.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2011-08-18 16:31:30 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-22 18:57:01 -0400
commite8799906045302776b35b66b16495c575db3b69c (patch)
treee6b5a76bd13ef0a9df24f7a7c8c1e924c0efcedb /drivers/usb/host/ehci-fsl.c
parentdfd8c81fd1c09c740140a2334669994d5c6edcaa (diff)
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>
Diffstat (limited to 'drivers/usb/host/ehci-fsl.c')
-rw-r--r--drivers/usb/host/ehci-fsl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 34a3140d1e5f..3bf9f16b4fd8 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -392,7 +392,7 @@ static int ehci_fsl_mpc512x_drv_suspend(struct device *dev)
392 392
393 dev_dbg(dev, "suspending...\n"); 393 dev_dbg(dev, "suspending...\n");
394 394
395 hcd->state = HC_STATE_SUSPENDED; 395 ehci->rh_state = EHCI_RH_SUSPENDED;
396 dev->power.power_state = PMSG_SUSPEND; 396 dev->power.power_state = PMSG_SUSPEND;
397 397
398 /* ignore non-host interrupts */ 398 /* ignore non-host interrupts */
@@ -481,7 +481,7 @@ static int ehci_fsl_mpc512x_drv_resume(struct device *dev)
481 ehci_writel(ehci, pdata->pm_portsc, &ehci->regs->port_status[0]); 481 ehci_writel(ehci, pdata->pm_portsc, &ehci->regs->port_status[0]);
482 482
483 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags); 483 set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
484 hcd->state = HC_STATE_RUNNING; 484 ehci->rh_state = EHCI_RH_RUNNING;
485 dev->power.power_state = PMSG_ON; 485 dev->power.power_state = PMSG_ON;
486 486
487 tmp = ehci_readl(ehci, &ehci->regs->command); 487 tmp = ehci_readl(ehci, &ehci->regs->command);