aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-hcd.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2010-06-22 16:39:10 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-10 17:35:37 -0400
commit541c7d432f76771079e7c295d596ea47cc6a3030 (patch)
tree9e04330713366d21849cecf0f3fd2f2c1834574d /drivers/usb/host/ohci-hcd.c
parent89ba85d4015b7fa738b35bcc228075c117a9a578 (diff)
USB: convert usb_hcd bitfields into atomic flags
This patch (as1393) converts several of the single-bit fields in struct usb_hcd to atomic flags. This is for safety's sake; not all CPUs can update bitfield values atomically, and these flags are used in multiple contexts. The flag fields that are set only during registration or removal can remain as they are, since non-atomic accesses at those times will not cause any problems. (Strictly speaking, the authorized_default flag should become atomic as well. I didn't bother with it because it gets changed only via sysfs. It can be done later, if anyone wants.) 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-hcd.c')
-rw-r--r--drivers/usb/host/ohci-hcd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 02864a237a2..c3b4ccc7337 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -212,7 +212,7 @@ static int ohci_urb_enqueue (
212 spin_lock_irqsave (&ohci->lock, flags); 212 spin_lock_irqsave (&ohci->lock, flags);
213 213
214 /* don't submit to a dead HC */ 214 /* don't submit to a dead HC */
215 if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) { 215 if (!HCD_HW_ACCESSIBLE(hcd)) {
216 retval = -ENODEV; 216 retval = -ENODEV;
217 goto fail; 217 goto fail;
218 } 218 }
@@ -685,7 +685,7 @@ retry:
685 } 685 }
686 686
687 /* use rhsc irqs after khubd is fully initialized */ 687 /* use rhsc irqs after khubd is fully initialized */
688 hcd->poll_rh = 1; 688 set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
689 hcd->uses_new_polling = 1; 689 hcd->uses_new_polling = 1;
690 690
691 /* start controller operations */ 691 /* start controller operations */
@@ -822,7 +822,7 @@ static irqreturn_t ohci_irq (struct usb_hcd *hcd)
822 else if (ints & OHCI_INTR_RD) { 822 else if (ints & OHCI_INTR_RD) {
823 ohci_vdbg(ohci, "resume detect\n"); 823 ohci_vdbg(ohci, "resume detect\n");
824 ohci_writel(ohci, OHCI_INTR_RD, &regs->intrstatus); 824 ohci_writel(ohci, OHCI_INTR_RD, &regs->intrstatus);
825 hcd->poll_rh = 1; 825 set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
826 if (ohci->autostop) { 826 if (ohci->autostop) {
827 spin_lock (&ohci->lock); 827 spin_lock (&ohci->lock);
828 ohci_rh_resume (ohci); 828 ohci_rh_resume (ohci);