aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/dummy_hcd.c2
-rw-r--r--drivers/usb/gadget/lh7a40x_udc.c2
-rw-r--r--drivers/usb/gadget/omap_udc.c2
-rw-r--r--drivers/usb/gadget/pxa2xx_udc.c2
-rw-r--r--drivers/usb/host/isp116x-hcd.c1
-rw-r--r--drivers/usb/host/ohci-au1xxx.c2
-rw-r--r--drivers/usb/host/ohci-lh7a404.c2
-rw-r--r--drivers/usb/host/ohci-omap.c4
-rw-r--r--drivers/usb/host/ohci-pci.c2
-rw-r--r--drivers/usb/host/ohci-ppc-soc.c2
-rw-r--r--drivers/usb/host/ohci-pxa27x.c3
-rw-r--r--drivers/usb/host/ohci-s3c2410.c2
-rw-r--r--drivers/usb/host/pci-quirks.c25
-rw-r--r--drivers/usb/host/sl811-hcd.c1
-rw-r--r--drivers/usb/host/sl811_cs.c1
-rw-r--r--drivers/usb/input/pid.c2
16 files changed, 50 insertions, 5 deletions
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c
index 02106bebd5c1..975ace3f5b1e 100644
--- a/drivers/usb/gadget/dummy_hcd.c
+++ b/drivers/usb/gadget/dummy_hcd.c
@@ -50,7 +50,7 @@
50#include <linux/list.h> 50#include <linux/list.h>
51#include <linux/interrupt.h> 51#include <linux/interrupt.h>
52#include <linux/version.h> 52#include <linux/version.h>
53 53#include <linux/platform_device.h>
54#include <linux/usb.h> 54#include <linux/usb.h>
55#include <linux/usb_gadget.h> 55#include <linux/usb_gadget.h>
56 56
diff --git a/drivers/usb/gadget/lh7a40x_udc.c b/drivers/usb/gadget/lh7a40x_udc.c
index 9b3673904daf..bc6269f10cbb 100644
--- a/drivers/usb/gadget/lh7a40x_udc.c
+++ b/drivers/usb/gadget/lh7a40x_udc.c
@@ -21,6 +21,8 @@
21 * 21 *
22 */ 22 */
23 23
24#include <linux/platform_device.h>
25
24#include "lh7a40x_udc.h" 26#include "lh7a40x_udc.h"
25 27
26//#define DEBUG printk 28//#define DEBUG printk
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c
index 41c96b0afbb3..387692a3611e 100644
--- a/drivers/usb/gadget/omap_udc.c
+++ b/drivers/usb/gadget/omap_udc.c
@@ -38,7 +38,7 @@
38#include <linux/proc_fs.h> 38#include <linux/proc_fs.h>
39#include <linux/mm.h> 39#include <linux/mm.h>
40#include <linux/moduleparam.h> 40#include <linux/moduleparam.h>
41#include <linux/device.h> 41#include <linux/platform_device.h>
42#include <linux/usb_ch9.h> 42#include <linux/usb_ch9.h>
43#include <linux/usb_gadget.h> 43#include <linux/usb_gadget.h>
44#include <linux/usb_otg.h> 44#include <linux/usb_otg.h>
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c
index f83a9262f953..ee9cd7869d92 100644
--- a/drivers/usb/gadget/pxa2xx_udc.c
+++ b/drivers/usb/gadget/pxa2xx_udc.c
@@ -43,7 +43,7 @@
43#include <linux/interrupt.h> 43#include <linux/interrupt.h>
44#include <linux/proc_fs.h> 44#include <linux/proc_fs.h>
45#include <linux/mm.h> 45#include <linux/mm.h>
46#include <linux/device.h> 46#include <linux/platform_device.h>
47#include <linux/dma-mapping.h> 47#include <linux/dma-mapping.h>
48 48
49#include <asm/byteorder.h> 49#include <asm/byteorder.h>
diff --git a/drivers/usb/host/isp116x-hcd.c b/drivers/usb/host/isp116x-hcd.c
index ddb8fc591466..f9c3f5b8dd1c 100644
--- a/drivers/usb/host/isp116x-hcd.c
+++ b/drivers/usb/host/isp116x-hcd.c
@@ -70,6 +70,7 @@
70#include <linux/interrupt.h> 70#include <linux/interrupt.h>
71#include <linux/usb.h> 71#include <linux/usb.h>
72#include <linux/usb_isp116x.h> 72#include <linux/usb_isp116x.h>
73#include <linux/platform_device.h>
73 74
74#include <asm/io.h> 75#include <asm/io.h>
75#include <asm/irq.h> 76#include <asm/irq.h>
diff --git a/drivers/usb/host/ohci-au1xxx.c b/drivers/usb/host/ohci-au1xxx.c
index a277e258eb6c..f0c78cf14b6c 100644
--- a/drivers/usb/host/ohci-au1xxx.c
+++ b/drivers/usb/host/ohci-au1xxx.c
@@ -18,6 +18,8 @@
18 * This file is licenced under the GPL. 18 * This file is licenced under the GPL.
19 */ 19 */
20 20
21#include <linux/platform_device.h>
22
21#include <asm/mach-au1x00/au1000.h> 23#include <asm/mach-au1x00/au1000.h>
22 24
23#define USBH_ENABLE_BE (1<<0) 25#define USBH_ENABLE_BE (1<<0)
diff --git a/drivers/usb/host/ohci-lh7a404.c b/drivers/usb/host/ohci-lh7a404.c
index 238fa4ade615..336c766c6e29 100644
--- a/drivers/usb/host/ohci-lh7a404.c
+++ b/drivers/usb/host/ohci-lh7a404.c
@@ -16,6 +16,8 @@
16 * This file is licenced under the GPL. 16 * This file is licenced under the GPL.
17 */ 17 */
18 18
19#include <linux/platform_device.h>
20
19#include <asm/hardware.h> 21#include <asm/hardware.h>
20 22
21 23
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index 45efeed1fcc3..e46cc540cf4d 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -14,6 +14,10 @@
14 * This file is licenced under the GPL. 14 * This file is licenced under the GPL.
15 */ 15 */
16 16
17#include <linux/signal.h> /* SA_INTERRUPT */
18#include <linux/jiffies.h>
19#include <linux/platform_device.h>
20
17#include <asm/hardware.h> 21#include <asm/hardware.h>
18#include <asm/io.h> 22#include <asm/io.h>
19#include <asm/mach-types.h> 23#include <asm/mach-types.h>
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c
index bf1d5ab4aa3a..7ce1d9ef0289 100644
--- a/drivers/usb/host/ohci-pci.c
+++ b/drivers/usb/host/ohci-pci.c
@@ -14,6 +14,8 @@
14 * This file is licenced under the GPL. 14 * This file is licenced under the GPL.
15 */ 15 */
16 16
17#include <linux/jiffies.h>
18
17#ifdef CONFIG_PPC_PMAC 19#ifdef CONFIG_PPC_PMAC
18#include <asm/machdep.h> 20#include <asm/machdep.h>
19#include <asm/pmac_feature.h> 21#include <asm/pmac_feature.h>
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c
index 4832e57ae579..92cf6f4a1374 100644
--- a/drivers/usb/host/ohci-ppc-soc.c
+++ b/drivers/usb/host/ohci-ppc-soc.c
@@ -14,6 +14,8 @@
14 * This file is licenced under the GPL. 14 * This file is licenced under the GPL.
15 */ 15 */
16 16
17#include <linux/platform_device.h>
18
17/* configure so an HC device and id are always provided */ 19/* configure so an HC device and id are always provided */
18/* always called with process context; sleeping is OK */ 20/* always called with process context; sleeping is OK */
19 21
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c
index d287dcccd415..59e20568e8f9 100644
--- a/drivers/usb/host/ohci-pxa27x.c
+++ b/drivers/usb/host/ohci-pxa27x.c
@@ -20,6 +20,9 @@
20 */ 20 */
21 21
22#include <linux/device.h> 22#include <linux/device.h>
23#include <linux/signal.h>
24#include <linux/platform_device.h>
25
23#include <asm/mach-types.h> 26#include <asm/mach-types.h>
24#include <asm/hardware.h> 27#include <asm/hardware.h>
25#include <asm/arch/pxa-regs.h> 28#include <asm/arch/pxa-regs.h>
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c
index fab420a2ce71..ee1fc605b402 100644
--- a/drivers/usb/host/ohci-s3c2410.c
+++ b/drivers/usb/host/ohci-s3c2410.c
@@ -19,6 +19,8 @@
19 * This file is licenced under the GPL. 19 * This file is licenced under the GPL.
20*/ 20*/
21 21
22#include <linux/platform_device.h>
23
22#include <asm/hardware.h> 24#include <asm/hardware.h>
23#include <asm/hardware/clock.h> 25#include <asm/hardware/clock.h>
24#include <asm/arch/usb-control.h> 26#include <asm/arch/usb-control.h>
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index b7fd3f644e1e..e46528c825bf 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -138,11 +138,23 @@ reset_needed:
138} 138}
139EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc); 139EXPORT_SYMBOL_GPL(uhci_check_and_reset_hc);
140 140
141static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask)
142{
143 u16 cmd;
144 return !pci_read_config_word(pdev, PCI_COMMAND, &cmd) && (cmd & mask);
145}
146
147#define pio_enabled(dev) io_type_enabled(dev, PCI_COMMAND_IO)
148#define mmio_enabled(dev) io_type_enabled(dev, PCI_COMMAND_MEMORY)
149
141static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev) 150static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev)
142{ 151{
143 unsigned long base = 0; 152 unsigned long base = 0;
144 int i; 153 int i;
145 154
155 if (!pio_enabled(pdev))
156 return;
157
146 for (i = 0; i < PCI_ROM_RESOURCE; i++) 158 for (i = 0; i < PCI_ROM_RESOURCE; i++)
147 if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) { 159 if ((pci_resource_flags(pdev, i) & IORESOURCE_IO)) {
148 base = pci_resource_start(pdev, i); 160 base = pci_resource_start(pdev, i);
@@ -153,12 +165,20 @@ static void __devinit quirk_usb_handoff_uhci(struct pci_dev *pdev)
153 uhci_check_and_reset_hc(pdev, base); 165 uhci_check_and_reset_hc(pdev, base);
154} 166}
155 167
168static int __devinit mmio_resource_enabled(struct pci_dev *pdev, int idx)
169{
170 return pci_resource_start(pdev, idx) && mmio_enabled(pdev);
171}
172
156static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) 173static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev)
157{ 174{
158 void __iomem *base; 175 void __iomem *base;
159 int wait_time; 176 int wait_time;
160 u32 control; 177 u32 control;
161 178
179 if (!mmio_resource_enabled(pdev, 0))
180 return;
181
162 base = ioremap_nocache(pci_resource_start(pdev, 0), 182 base = ioremap_nocache(pci_resource_start(pdev, 0),
163 pci_resource_len(pdev, 0)); 183 pci_resource_len(pdev, 0));
164 if (base == NULL) return; 184 if (base == NULL) return;
@@ -201,6 +221,9 @@ static void __devinit quirk_usb_disable_ehci(struct pci_dev *pdev)
201 u32 hcc_params, val, temp; 221 u32 hcc_params, val, temp;
202 u8 cap_length; 222 u8 cap_length;
203 223
224 if (!mmio_resource_enabled(pdev, 0))
225 return;
226
204 base = ioremap_nocache(pci_resource_start(pdev, 0), 227 base = ioremap_nocache(pci_resource_start(pdev, 0),
205 pci_resource_len(pdev, 0)); 228 pci_resource_len(pdev, 0));
206 if (base == NULL) return; 229 if (base == NULL) return;
@@ -293,4 +316,4 @@ static void __devinit quirk_usb_early_handoff(struct pci_dev *pdev)
293 else if (pdev->class == PCI_CLASS_SERIAL_USB_EHCI) 316 else if (pdev->class == PCI_CLASS_SERIAL_USB_EHCI)
294 quirk_usb_disable_ehci(pdev); 317 quirk_usb_disable_ehci(pdev);
295} 318}
296DECLARE_PCI_FIXUP_HEADER(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff); 319DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID, quirk_usb_early_handoff);
diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c
index 40169d9cf2b1..5607c0ae6835 100644
--- a/drivers/usb/host/sl811-hcd.c
+++ b/drivers/usb/host/sl811-hcd.c
@@ -54,6 +54,7 @@
54#include <linux/interrupt.h> 54#include <linux/interrupt.h>
55#include <linux/usb.h> 55#include <linux/usb.h>
56#include <linux/usb_sl811.h> 56#include <linux/usb_sl811.h>
57#include <linux/platform_device.h>
57 58
58#include <asm/io.h> 59#include <asm/io.h>
59#include <asm/irq.h> 60#include <asm/irq.h>
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index 38aebe361ca1..e73faf831b24 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -19,6 +19,7 @@
19#include <linux/string.h> 19#include <linux/string.h>
20#include <linux/timer.h> 20#include <linux/timer.h>
21#include <linux/ioport.h> 21#include <linux/ioport.h>
22#include <linux/platform_device.h>
22 23
23#include <pcmcia/cs_types.h> 24#include <pcmcia/cs_types.h>
24#include <pcmcia/cs.h> 25#include <pcmcia/cs.h>
diff --git a/drivers/usb/input/pid.c b/drivers/usb/input/pid.c
index a00672c96644..dca5ee93a4ef 100644
--- a/drivers/usb/input/pid.c
+++ b/drivers/usb/input/pid.c
@@ -198,7 +198,7 @@ static int hid_pid_upload_effect(struct input_dev *dev,
198 } 198 }
199 199
200 effect->id = id; 200 effect->id = id;
201 dev_dbg(&pid_private->hid->dev->dev, "effect ID is %d\n.", id); 201 dev_dbg(&pid_private->hid->dev->dev, "effect ID is %d.\n", id);
202 pid_private->effects[id].owner = current->pid; 202 pid_private->effects[id].owner = current->pid;
203 pid_private->effects[id].flags = (1 << FF_PID_FLAGS_USED); 203 pid_private->effects[id].flags = (1 << FF_PID_FLAGS_USED);
204 spin_unlock_irqrestore(&pid_private->lock, flags); 204 spin_unlock_irqrestore(&pid_private->lock, flags);