USB: ohci-exynos: replace hcd->state with ohci->rh_state
authorJingoo Han <jg1.han@samsung.com>
Thu, 23 Feb 2012 08:26:33 +0000 (17:26 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 24 Feb 2012 21:40:04 +0000 (13:40 -0800)
This patch removes uses of hcd->state and replaces hcd->state with
ohci->rh_state field.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/ohci-exynos.c

index 55aa35a..37bb20e 100644 (file)
@@ -212,12 +212,10 @@ static int exynos_ohci_suspend(struct device *dev)
         * mark HW unaccessible, bail out if RH has been resumed. Use
         * the spinlock to properly synchronize with possible pending
         * RH suspend or resume activity.
-        *
-        * This is still racy as hcd->state is manipulated outside of
-        * any locks =P But that will be a different fix.
         */
        spin_lock_irqsave(&ohci->lock, flags);
-       if (hcd->state != HC_STATE_SUSPENDED && hcd->state != HC_STATE_HALT) {
+       if (ohci->rh_state != OHCI_RH_SUSPENDED &&
+                       ohci->rh_state != OHCI_RH_HALTED) {
                rc = -EINVAL;
                goto fail;
        }