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>
This commit is contained in:
parent
4a71f242e5
commit
7c71c6e6be
1 changed files with 5 additions and 4 deletions
|
@ -212,10 +212,11 @@ __acquires(ohci->lock)
|
||||||
/* Sometimes PCI D3 suspend trashes frame timings ... */
|
/* Sometimes PCI D3 suspend trashes frame timings ... */
|
||||||
periodic_reinit (ohci);
|
periodic_reinit (ohci);
|
||||||
|
|
||||||
/* the following code is executed with ohci->lock held and
|
/*
|
||||||
* irqs disabled if and only if autostopped is true
|
* The following code is executed with ohci->lock held and
|
||||||
|
* irqs disabled if and only if autostopped is true. This
|
||||||
|
* will cause sparse to warn about a "context imbalance".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
skip_resume:
|
skip_resume:
|
||||||
/* interrupts might have been disabled */
|
/* interrupts might have been disabled */
|
||||||
ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable);
|
ohci_writel (ohci, OHCI_INTR_INIT, &ohci->regs->intrenable);
|
||||||
|
@ -531,7 +532,7 @@ ohci_hub_descriptor (
|
||||||
temp |= 0x0010;
|
temp |= 0x0010;
|
||||||
else if (rh & RH_A_OCPM) /* per-port overcurrent reporting? */
|
else if (rh & RH_A_OCPM) /* per-port overcurrent reporting? */
|
||||||
temp |= 0x0008;
|
temp |= 0x0008;
|
||||||
desc->wHubCharacteristics = (__force __u16)cpu_to_hc16(ohci, temp);
|
desc->wHubCharacteristics = cpu_to_le16(temp);
|
||||||
|
|
||||||
/* ports removable, and usb 1.0 legacy PortPwrCtrlMask */
|
/* ports removable, and usb 1.0 legacy PortPwrCtrlMask */
|
||||||
rh = roothub_b (ohci);
|
rh = roothub_b (ohci);
|
||||||
|
|
Loading…
Add table
Reference in a new issue