Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

USB: ohci-exynos: replace hcd->state with ohci->rh_state

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>

authored by

Jingoo Han and committed by
Greg Kroah-Hartman
2b4ffe31 8c1b3693

+2 -4
+2 -4
drivers/usb/host/ohci-exynos.c
··· 212 212 * mark HW unaccessible, bail out if RH has been resumed. Use 213 213 * the spinlock to properly synchronize with possible pending 214 214 * RH suspend or resume activity. 215 - * 216 - * This is still racy as hcd->state is manipulated outside of 217 - * any locks =P But that will be a different fix. 218 215 */ 219 216 spin_lock_irqsave(&ohci->lock, flags); 220 - if (hcd->state != HC_STATE_SUSPENDED && hcd->state != HC_STATE_HALT) { 217 + if (ohci->rh_state != OHCI_RH_SUSPENDED && 218 + ohci->rh_state != OHCI_RH_HALTED) { 221 219 rc = -EINVAL; 222 220 goto fail; 223 221 }