aboutsummaryrefslogtreecommitdiffstats
path: root/usb/usb-kill-compiler-warning-in-quirk_usb_handoff_ohci.patch
blob: 18a88efac75da8cb1a5abbd2a200c2c3a6fd31c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
From kyle@athena.road.mcmartin.ca Tue Jun 27 09:11:48 2006
Date: Sun, 25 Jun 2006 18:45:29 -0400
From: Kyle McMartin <kyle@mcmartin.ca>
To: gregkh@suse.de
Subject: USB: Kill compiler warning in quirk_usb_handoff_ohci
Message-ID: <20060625224529.GB2837@athena.road.mcmartin.ca>
Content-Disposition: inline

From: Kyle McMartin <kyle@parisc-linux.org>

Move variables only used on !__hppa__ into that #ifndef section. This
cleans up a compiler warning on parisc. Problem pointed out by
Joel Soete.

Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
 drivers/usb/host/pci-quirks.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- gregkh-2.6.orig/drivers/usb/host/pci-quirks.c
+++ gregkh-2.6/drivers/usb/host/pci-quirks.c
@@ -167,8 +167,6 @@ static int __devinit mmio_resource_enabl
 static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
 {
 	void __iomem *base;
-	int wait_time;
-	u32 control;
 
 	if (!mmio_resource_enabled(pdev, 0))
 		return;
@@ -179,9 +177,10 @@ static void __devinit quirk_usb_handoff_
 
 /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */
 #ifndef __hppa__
-	control = readl(base + OHCI_CONTROL);
+{
+	u32 control = readl(base + OHCI_CONTROL);
 	if (control & OHCI_CTRL_IR) {
-		wait_time = 500; /* arbitrary; 5 seconds */
+		int wait_time = 500; /* arbitrary; 5 seconds */
 		writel(OHCI_INTR_OC, base + OHCI_INTRENABLE);
 		writel(OHCI_OCR, base + OHCI_CMDSTATUS);
 		while (wait_time > 0 &&
@@ -198,6 +197,7 @@ static void __devinit quirk_usb_handoff_
 		/* reset controller, preserving RWC */
 		writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL);
 	}
+}
 #endif
 
 	/*