aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-hcd.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hartleys@visionengravers.com>2009-04-22 16:18:59 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-16 00:44:42 -0400
commit96f90a8b0dc84538ee4a31d3a5b80d758916629e (patch)
treea7f6354911e07368e63b0db81c1c577b2a1dfcbe /drivers/usb/host/ohci-hcd.c
parent367815eea4e483d9c3630f69ae0a57e1e32a92b0 (diff)
USB: host/ohci-hcd.c: fix sparse warnings
Fix sparse warnings in drivers/usb/host/ohci-hcd.c. Four of the following sparse warning are seen when building on ARM due do the macro raw_local_irq_save(): warning: symbol 'temp' shadows an earlier one Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> 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.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c
index 25db704f3a2a..7635acf0998c 100644
--- a/drivers/usb/host/ohci-hcd.c
+++ b/drivers/usb/host/ohci-hcd.c
@@ -571,7 +571,7 @@ static int ohci_init (struct ohci_hcd *ohci)
571 */ 571 */
572static int ohci_run (struct ohci_hcd *ohci) 572static int ohci_run (struct ohci_hcd *ohci)
573{ 573{
574 u32 mask, temp; 574 u32 mask, val;
575 int first = ohci->fminterval == 0; 575 int first = ohci->fminterval == 0;
576 struct usb_hcd *hcd = ohci_to_hcd(ohci); 576 struct usb_hcd *hcd = ohci_to_hcd(ohci);
577 577
@@ -580,8 +580,8 @@ static int ohci_run (struct ohci_hcd *ohci)
580 /* boot firmware should have set this up (5.1.1.3.1) */ 580 /* boot firmware should have set this up (5.1.1.3.1) */
581 if (first) { 581 if (first) {
582 582
583 temp = ohci_readl (ohci, &ohci->regs->fminterval); 583 val = ohci_readl (ohci, &ohci->regs->fminterval);
584 ohci->fminterval = temp & 0x3fff; 584 ohci->fminterval = val & 0x3fff;
585 if (ohci->fminterval != FI) 585 if (ohci->fminterval != FI)
586 ohci_dbg (ohci, "fminterval delta %d\n", 586 ohci_dbg (ohci, "fminterval delta %d\n",
587 ohci->fminterval - FI); 587 ohci->fminterval - FI);
@@ -600,25 +600,25 @@ static int ohci_run (struct ohci_hcd *ohci)
600 600
601 switch (ohci->hc_control & OHCI_CTRL_HCFS) { 601 switch (ohci->hc_control & OHCI_CTRL_HCFS) {
602 case OHCI_USB_OPER: 602 case OHCI_USB_OPER:
603 temp = 0; 603 val = 0;
604 break; 604 break;
605 case OHCI_USB_SUSPEND: 605 case OHCI_USB_SUSPEND:
606 case OHCI_USB_RESUME: 606 case OHCI_USB_RESUME:
607 ohci->hc_control &= OHCI_CTRL_RWC; 607 ohci->hc_control &= OHCI_CTRL_RWC;
608 ohci->hc_control |= OHCI_USB_RESUME; 608 ohci->hc_control |= OHCI_USB_RESUME;
609 temp = 10 /* msec wait */; 609 val = 10 /* msec wait */;
610 break; 610 break;
611 // case OHCI_USB_RESET: 611 // case OHCI_USB_RESET:
612 default: 612 default:
613 ohci->hc_control &= OHCI_CTRL_RWC; 613 ohci->hc_control &= OHCI_CTRL_RWC;
614 ohci->hc_control |= OHCI_USB_RESET; 614 ohci->hc_control |= OHCI_USB_RESET;
615 temp = 50 /* msec wait */; 615 val = 50 /* msec wait */;
616 break; 616 break;
617 } 617 }
618 ohci_writel (ohci, ohci->hc_control, &ohci->regs->control); 618 ohci_writel (ohci, ohci->hc_control, &ohci->regs->control);
619 // flush the writes 619 // flush the writes
620 (void) ohci_readl (ohci, &ohci->regs->control); 620 (void) ohci_readl (ohci, &ohci->regs->control);
621 msleep(temp); 621 msleep(val);
622 622
623 memset (ohci->hcca, 0, sizeof (struct ohci_hcca)); 623 memset (ohci->hcca, 0, sizeof (struct ohci_hcca));
624 624
@@ -628,9 +628,9 @@ static int ohci_run (struct ohci_hcd *ohci)
628retry: 628retry:
629 /* HC Reset requires max 10 us delay */ 629 /* HC Reset requires max 10 us delay */
630 ohci_writel (ohci, OHCI_HCR, &ohci->regs->cmdstatus); 630 ohci_writel (ohci, OHCI_HCR, &ohci->regs->cmdstatus);
631 temp = 30; /* ... allow extra time */ 631 val = 30; /* ... allow extra time */
632 while ((ohci_readl (ohci, &ohci->regs->cmdstatus) & OHCI_HCR) != 0) { 632 while ((ohci_readl (ohci, &ohci->regs->cmdstatus) & OHCI_HCR) != 0) {
633 if (--temp == 0) { 633 if (--val == 0) {
634 spin_unlock_irq (&ohci->lock); 634 spin_unlock_irq (&ohci->lock);
635 ohci_err (ohci, "USB HC reset timed out!\n"); 635 ohci_err (ohci, "USB HC reset timed out!\n");
636 return -1; 636 return -1;
@@ -699,23 +699,23 @@ retry:
699 ohci_writel (ohci, mask, &ohci->regs->intrenable); 699 ohci_writel (ohci, mask, &ohci->regs->intrenable);
700 700
701 /* handle root hub init quirks ... */ 701 /* handle root hub init quirks ... */
702 temp = roothub_a (ohci); 702 val = roothub_a (ohci);
703 temp &= ~(RH_A_PSM | RH_A_OCPM); 703 val &= ~(RH_A_PSM | RH_A_OCPM);
704 if (ohci->flags & OHCI_QUIRK_SUPERIO) { 704 if (ohci->flags & OHCI_QUIRK_SUPERIO) {
705 /* NSC 87560 and maybe others */ 705 /* NSC 87560 and maybe others */
706 temp |= RH_A_NOCP; 706 val |= RH_A_NOCP;
707 temp &= ~(RH_A_POTPGT | RH_A_NPS); 707 val &= ~(RH_A_POTPGT | RH_A_NPS);
708 ohci_writel (ohci, temp, &ohci->regs->roothub.a); 708 ohci_writel (ohci, val, &ohci->regs->roothub.a);
709 } else if ((ohci->flags & OHCI_QUIRK_AMD756) || 709 } else if ((ohci->flags & OHCI_QUIRK_AMD756) ||
710 (ohci->flags & OHCI_QUIRK_HUB_POWER)) { 710 (ohci->flags & OHCI_QUIRK_HUB_POWER)) {
711 /* hub power always on; required for AMD-756 and some 711 /* hub power always on; required for AMD-756 and some
712 * Mac platforms. ganged overcurrent reporting, if any. 712 * Mac platforms. ganged overcurrent reporting, if any.
713 */ 713 */
714 temp |= RH_A_NPS; 714 val |= RH_A_NPS;
715 ohci_writel (ohci, temp, &ohci->regs->roothub.a); 715 ohci_writel (ohci, val, &ohci->regs->roothub.a);
716 } 716 }
717 ohci_writel (ohci, RH_HS_LPSC, &ohci->regs->roothub.status); 717 ohci_writel (ohci, RH_HS_LPSC, &ohci->regs->roothub.status);
718 ohci_writel (ohci, (temp & RH_A_NPS) ? 0 : RH_B_PPCM, 718 ohci_writel (ohci, (val & RH_A_NPS) ? 0 : RH_B_PPCM,
719 &ohci->regs->roothub.b); 719 &ohci->regs->roothub.b);
720 // flush those writes 720 // flush those writes
721 (void) ohci_readl (ohci, &ohci->regs->control); 721 (void) ohci_readl (ohci, &ohci->regs->control);
@@ -724,7 +724,7 @@ retry:
724 spin_unlock_irq (&ohci->lock); 724 spin_unlock_irq (&ohci->lock);
725 725
726 // POTPGT delay is bits 24-31, in 2 ms units. 726 // POTPGT delay is bits 24-31, in 2 ms units.
727 mdelay ((temp >> 23) & 0x1fe); 727 mdelay ((val >> 23) & 0x1fe);
728 hcd->state = HC_STATE_RUNNING; 728 hcd->state = HC_STATE_RUNNING;
729 729
730 if (quirk_zfmicro(ohci)) { 730 if (quirk_zfmicro(ohci)) {