aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2013-10-18 11:16:07 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-19 17:08:04 -0400
commit7c71c6e6befd4b234e166f2f40d4430bacc779e6 (patch)
tree9d44db70c118963e12b052ecc9f6f3affe0878a6 /drivers/usb
parent4a71f242e51767e75c7ecdba890debab2c0dceaf (diff)
USB: OHCI: fix and explain sparse errors
This patch fixes an endian-related error in ohci-hcd (detected by sparse) and clarifies a comment explaining a peculiar locking arrangement that sparse warns about. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/host/ohci-hub.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c
index 2347ab83f046..61705a760e7d 100644
--- a/drivers/usb/host/ohci-hub.c
+++ b/drivers/usb/host/ohci-hub.c
@@ -212,10 +212,11 @@ __acquires(ohci->lock)
212 /* Sometimes PCI D3 suspend trashes frame timings ... */ 212 /* Sometimes PCI D3 suspend trashes frame timings ... */
213 periodic_reinit (ohci); 213 periodic_reinit (ohci);
214 214
215 /* the following code is executed with ohci->lock held and 215 /*
216 * irqs disabled if and only if autostopped is true 216 * The following code is executed with ohci->lock held and
217 * irqs disabled if and only if autostopped is true. This
218 * will cause sparse to warn about a "context imbalance".
217 */ 219 */
218
219skip_resume: 220skip_resume:
220 /* interrupts might have been disabled */ 221 /* interrupts might have been disabled */
221 ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable); 222 ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable);
@@ -531,7 +532,7 @@ ohci_hub_descriptor (
531 temp |= 0x0010; 532 temp |= 0x0010;
532 else if (rh & RH_A_OCPM) /* per-port overcurrent reporting? */ 533 else if (rh & RH_A_OCPM) /* per-port overcurrent reporting? */
533 temp |= 0x0008; 534 temp |= 0x0008;
534 desc->wHubCharacteristics = (__force __u16)cpu_to_hc16(ohci, temp); 535 desc->wHubCharacteristics = cpu_to_le16(temp);
535 536
536 /* ports removable, and usb 1.0 legacy PortPwrCtrlMask */ 537 /* ports removable, and usb 1.0 legacy PortPwrCtrlMask */
537 rh = roothub_b (ohci); 538 rh = roothub_b (ohci);