Skip to content

Commit

Permalink
USB: ohci-exynos: replace hcd->state with ohci->rh_state
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jingoo Han authored and Greg Kroah-Hartman committed Feb 24, 2012
1 parent 8c1b369 commit 2b4ffe3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/usb/host/ohci-exynos.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 2b4ffe3

Please sign in to comment.