diff options
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/atm/speedtch.c | 5 | ||||
-rw-r--r-- | drivers/usb/gadget/fsl_qe_udc.c | 7 | ||||
-rw-r--r-- | drivers/usb/gadget/printer.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ehci-mxc.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ehci-ppc-of.c | 11 | ||||
-rw-r--r-- | drivers/usb/host/ehci-xilinx-of.c | 9 | ||||
-rw-r--r-- | drivers/usb/host/fhci-hcd.c | 11 | ||||
-rw-r--r-- | drivers/usb/host/isp1760-if.c | 9 | ||||
-rw-r--r-- | drivers/usb/host/ohci-ppc-of.c | 15 | ||||
-rw-r--r-- | drivers/usb/mon/mon_bin.c | 23 | ||||
-rw-r--r-- | drivers/usb/mon/mon_stat.c | 3 |
11 files changed, 56 insertions, 43 deletions
diff --git a/drivers/usb/atm/speedtch.c b/drivers/usb/atm/speedtch.c index 1e9ba4bdffef..1335456b4f93 100644 --- a/drivers/usb/atm/speedtch.c +++ b/drivers/usb/atm/speedtch.c | |||
@@ -127,8 +127,6 @@ MODULE_PARM_DESC(ModemOption, "default: 0x10,0x00,0x00,0x00,0x20"); | |||
127 | #define ENDPOINT_ISOC_DATA 0x07 | 127 | #define ENDPOINT_ISOC_DATA 0x07 |
128 | #define ENDPOINT_FIRMWARE 0x05 | 128 | #define ENDPOINT_FIRMWARE 0x05 |
129 | 129 | ||
130 | #define hex2int(c) ( (c >= '0') && (c <= '9') ? (c - '0') : ((c & 0xf) + 9) ) | ||
131 | |||
132 | struct speedtch_params { | 130 | struct speedtch_params { |
133 | unsigned int altsetting; | 131 | unsigned int altsetting; |
134 | unsigned int BMaxDSL; | 132 | unsigned int BMaxDSL; |
@@ -669,7 +667,8 @@ static int speedtch_atm_start(struct usbatm_data *usbatm, struct atm_dev *atm_de | |||
669 | memset(atm_dev->esi, 0, sizeof(atm_dev->esi)); | 667 | memset(atm_dev->esi, 0, sizeof(atm_dev->esi)); |
670 | if (usb_string(usb_dev, usb_dev->descriptor.iSerialNumber, mac_str, sizeof(mac_str)) == 12) { | 668 | if (usb_string(usb_dev, usb_dev->descriptor.iSerialNumber, mac_str, sizeof(mac_str)) == 12) { |
671 | for (i = 0; i < 6; i++) | 669 | for (i = 0; i < 6; i++) |
672 | atm_dev->esi[i] = (hex2int(mac_str[i * 2]) * 16) + (hex2int(mac_str[i * 2 + 1])); | 670 | atm_dev->esi[i] = (hex_to_bin(mac_str[i * 2]) << 4) + |
671 | hex_to_bin(mac_str[i * 2 + 1]); | ||
673 | } | 672 | } |
674 | 673 | ||
675 | /* Start modem synchronisation */ | 674 | /* Start modem synchronisation */ |
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c index 3537d51073b2..2928523268b5 100644 --- a/drivers/usb/gadget/fsl_qe_udc.c +++ b/drivers/usb/gadget/fsl_qe_udc.c | |||
@@ -2768,8 +2768,11 @@ static const struct of_device_id qe_udc_match[] __devinitconst = { | |||
2768 | MODULE_DEVICE_TABLE(of, qe_udc_match); | 2768 | MODULE_DEVICE_TABLE(of, qe_udc_match); |
2769 | 2769 | ||
2770 | static struct of_platform_driver udc_driver = { | 2770 | static struct of_platform_driver udc_driver = { |
2771 | .name = (char *)driver_name, | 2771 | .driver = { |
2772 | .match_table = qe_udc_match, | 2772 | .name = (char *)driver_name, |
2773 | .owner = THIS_MODULE, | ||
2774 | .of_match_table = qe_udc_match, | ||
2775 | }, | ||
2773 | .probe = qe_udc_probe, | 2776 | .probe = qe_udc_probe, |
2774 | .remove = __devexit_p(qe_udc_remove), | 2777 | .remove = __devexit_p(qe_udc_remove), |
2775 | #ifdef CONFIG_PM | 2778 | #ifdef CONFIG_PM |
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 6b8bf8c781c4..43abf55d8c60 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -794,7 +794,7 @@ printer_write(struct file *fd, const char __user *buf, size_t len, loff_t *ptr) | |||
794 | } | 794 | } |
795 | 795 | ||
796 | static int | 796 | static int |
797 | printer_fsync(struct file *fd, struct dentry *dentry, int datasync) | 797 | printer_fsync(struct file *fd, int datasync) |
798 | { | 798 | { |
799 | struct printer_dev *dev = fd->private_data; | 799 | struct printer_dev *dev = fd->private_data; |
800 | unsigned long flags; | 800 | unsigned long flags; |
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c index ead59f42e69b..544ccfd7056e 100644 --- a/drivers/usb/host/ehci-mxc.c +++ b/drivers/usb/host/ehci-mxc.c | |||
@@ -199,8 +199,8 @@ static int ehci_mxc_drv_probe(struct platform_device *pdev) | |||
199 | writel(pdata->portsc, hcd->regs + PORTSC_OFFSET); | 199 | writel(pdata->portsc, hcd->regs + PORTSC_OFFSET); |
200 | mdelay(10); | 200 | mdelay(10); |
201 | 201 | ||
202 | /* setup USBCONTROL. */ | 202 | /* setup specific usb hw */ |
203 | ret = mxc_set_usbcontrol(pdev->id, pdata->flags); | 203 | ret = mxc_initialize_usb_hw(pdev->id, pdata->flags); |
204 | if (ret < 0) | 204 | if (ret < 0) |
205 | goto err_init; | 205 | goto err_init; |
206 | 206 | ||
diff --git a/drivers/usb/host/ehci-ppc-of.c b/drivers/usb/host/ehci-ppc-of.c index 8df33b8a634c..5aec92866ab3 100644 --- a/drivers/usb/host/ehci-ppc-of.c +++ b/drivers/usb/host/ehci-ppc-of.c | |||
@@ -108,7 +108,7 @@ ppc44x_enable_bmt(struct device_node *dn) | |||
108 | static int __devinit | 108 | static int __devinit |
109 | ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) | 109 | ehci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) |
110 | { | 110 | { |
111 | struct device_node *dn = op->node; | 111 | struct device_node *dn = op->dev.of_node; |
112 | struct usb_hcd *hcd; | 112 | struct usb_hcd *hcd; |
113 | struct ehci_hcd *ehci = NULL; | 113 | struct ehci_hcd *ehci = NULL; |
114 | struct resource res; | 114 | struct resource res; |
@@ -274,13 +274,12 @@ MODULE_DEVICE_TABLE(of, ehci_hcd_ppc_of_match); | |||
274 | 274 | ||
275 | 275 | ||
276 | static struct of_platform_driver ehci_hcd_ppc_of_driver = { | 276 | static struct of_platform_driver ehci_hcd_ppc_of_driver = { |
277 | .name = "ppc-of-ehci", | ||
278 | .match_table = ehci_hcd_ppc_of_match, | ||
279 | .probe = ehci_hcd_ppc_of_probe, | 277 | .probe = ehci_hcd_ppc_of_probe, |
280 | .remove = ehci_hcd_ppc_of_remove, | 278 | .remove = ehci_hcd_ppc_of_remove, |
281 | .shutdown = ehci_hcd_ppc_of_shutdown, | 279 | .shutdown = ehci_hcd_ppc_of_shutdown, |
282 | .driver = { | 280 | .driver = { |
283 | .name = "ppc-of-ehci", | 281 | .name = "ppc-of-ehci", |
284 | .owner = THIS_MODULE, | 282 | .owner = THIS_MODULE, |
283 | .of_match_table = ehci_hcd_ppc_of_match, | ||
285 | }, | 284 | }, |
286 | }; | 285 | }; |
diff --git a/drivers/usb/host/ehci-xilinx-of.c b/drivers/usb/host/ehci-xilinx-of.c index f603bb2c0a8e..013972bbde57 100644 --- a/drivers/usb/host/ehci-xilinx-of.c +++ b/drivers/usb/host/ehci-xilinx-of.c | |||
@@ -288,13 +288,12 @@ static const struct of_device_id ehci_hcd_xilinx_of_match[] = { | |||
288 | MODULE_DEVICE_TABLE(of, ehci_hcd_xilinx_of_match); | 288 | MODULE_DEVICE_TABLE(of, ehci_hcd_xilinx_of_match); |
289 | 289 | ||
290 | static struct of_platform_driver ehci_hcd_xilinx_of_driver = { | 290 | static struct of_platform_driver ehci_hcd_xilinx_of_driver = { |
291 | .name = "xilinx-of-ehci", | ||
292 | .match_table = ehci_hcd_xilinx_of_match, | ||
293 | .probe = ehci_hcd_xilinx_of_probe, | 291 | .probe = ehci_hcd_xilinx_of_probe, |
294 | .remove = ehci_hcd_xilinx_of_remove, | 292 | .remove = ehci_hcd_xilinx_of_remove, |
295 | .shutdown = ehci_hcd_xilinx_of_shutdown, | 293 | .shutdown = ehci_hcd_xilinx_of_shutdown, |
296 | .driver = { | 294 | .driver = { |
297 | .name = "xilinx-of-ehci", | 295 | .name = "xilinx-of-ehci", |
298 | .owner = THIS_MODULE, | 296 | .owner = THIS_MODULE, |
297 | .of_match_table = ehci_hcd_xilinx_of_match, | ||
299 | }, | 298 | }, |
300 | }; | 299 | }; |
diff --git a/drivers/usb/host/fhci-hcd.c b/drivers/usb/host/fhci-hcd.c index 90453379a434..c7c8392a88b9 100644 --- a/drivers/usb/host/fhci-hcd.c +++ b/drivers/usb/host/fhci-hcd.c | |||
@@ -565,7 +565,7 @@ static int __devinit of_fhci_probe(struct of_device *ofdev, | |||
565 | const struct of_device_id *ofid) | 565 | const struct of_device_id *ofid) |
566 | { | 566 | { |
567 | struct device *dev = &ofdev->dev; | 567 | struct device *dev = &ofdev->dev; |
568 | struct device_node *node = ofdev->node; | 568 | struct device_node *node = dev->of_node; |
569 | struct usb_hcd *hcd; | 569 | struct usb_hcd *hcd; |
570 | struct fhci_hcd *fhci; | 570 | struct fhci_hcd *fhci; |
571 | struct resource usb_regs; | 571 | struct resource usb_regs; |
@@ -670,7 +670,7 @@ static int __devinit of_fhci_probe(struct of_device *ofdev, | |||
670 | } | 670 | } |
671 | 671 | ||
672 | for (j = 0; j < NUM_PINS; j++) { | 672 | for (j = 0; j < NUM_PINS; j++) { |
673 | fhci->pins[j] = qe_pin_request(ofdev->node, j); | 673 | fhci->pins[j] = qe_pin_request(node, j); |
674 | if (IS_ERR(fhci->pins[j])) { | 674 | if (IS_ERR(fhci->pins[j])) { |
675 | ret = PTR_ERR(fhci->pins[j]); | 675 | ret = PTR_ERR(fhci->pins[j]); |
676 | dev_err(dev, "can't get pin %d: %d\n", j, ret); | 676 | dev_err(dev, "can't get pin %d: %d\n", j, ret); |
@@ -813,8 +813,11 @@ static const struct of_device_id of_fhci_match[] = { | |||
813 | MODULE_DEVICE_TABLE(of, of_fhci_match); | 813 | MODULE_DEVICE_TABLE(of, of_fhci_match); |
814 | 814 | ||
815 | static struct of_platform_driver of_fhci_driver = { | 815 | static struct of_platform_driver of_fhci_driver = { |
816 | .name = "fsl,usb-fhci", | 816 | .driver = { |
817 | .match_table = of_fhci_match, | 817 | .name = "fsl,usb-fhci", |
818 | .owner = THIS_MODULE, | ||
819 | .of_match_table = of_fhci_match, | ||
820 | }, | ||
818 | .probe = of_fhci_probe, | 821 | .probe = of_fhci_probe, |
819 | .remove = __devexit_p(of_fhci_remove), | 822 | .remove = __devexit_p(of_fhci_remove), |
820 | }; | 823 | }; |
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index 8f0259eaa2c7..ec85d0c3cc3e 100644 --- a/drivers/usb/host/isp1760-if.c +++ b/drivers/usb/host/isp1760-if.c | |||
@@ -31,7 +31,7 @@ static int of_isp1760_probe(struct of_device *dev, | |||
31 | const struct of_device_id *match) | 31 | const struct of_device_id *match) |
32 | { | 32 | { |
33 | struct usb_hcd *hcd; | 33 | struct usb_hcd *hcd; |
34 | struct device_node *dp = dev->node; | 34 | struct device_node *dp = dev->dev.of_node; |
35 | struct resource *res; | 35 | struct resource *res; |
36 | struct resource memory; | 36 | struct resource memory; |
37 | struct of_irq oirq; | 37 | struct of_irq oirq; |
@@ -120,8 +120,11 @@ static const struct of_device_id of_isp1760_match[] = { | |||
120 | MODULE_DEVICE_TABLE(of, of_isp1760_match); | 120 | MODULE_DEVICE_TABLE(of, of_isp1760_match); |
121 | 121 | ||
122 | static struct of_platform_driver isp1760_of_driver = { | 122 | static struct of_platform_driver isp1760_of_driver = { |
123 | .name = "nxp-isp1760", | 123 | .driver = { |
124 | .match_table = of_isp1760_match, | 124 | .name = "nxp-isp1760", |
125 | .owner = THIS_MODULE, | ||
126 | .of_match_table = of_isp1760_match, | ||
127 | }, | ||
125 | .probe = of_isp1760_probe, | 128 | .probe = of_isp1760_probe, |
126 | .remove = of_isp1760_remove, | 129 | .remove = of_isp1760_remove, |
127 | }; | 130 | }; |
diff --git a/drivers/usb/host/ohci-ppc-of.c b/drivers/usb/host/ohci-ppc-of.c index 103263c230cf..df165917412a 100644 --- a/drivers/usb/host/ohci-ppc-of.c +++ b/drivers/usb/host/ohci-ppc-of.c | |||
@@ -83,7 +83,7 @@ static const struct hc_driver ohci_ppc_of_hc_driver = { | |||
83 | static int __devinit | 83 | static int __devinit |
84 | ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) | 84 | ohci_hcd_ppc_of_probe(struct of_device *op, const struct of_device_id *match) |
85 | { | 85 | { |
86 | struct device_node *dn = op->node; | 86 | struct device_node *dn = op->dev.of_node; |
87 | struct usb_hcd *hcd; | 87 | struct usb_hcd *hcd; |
88 | struct ohci_hcd *ohci; | 88 | struct ohci_hcd *ohci; |
89 | struct resource res; | 89 | struct resource res; |
@@ -244,18 +244,13 @@ MODULE_DEVICE_TABLE(of, ohci_hcd_ppc_of_match); | |||
244 | 244 | ||
245 | 245 | ||
246 | static struct of_platform_driver ohci_hcd_ppc_of_driver = { | 246 | static struct of_platform_driver ohci_hcd_ppc_of_driver = { |
247 | .name = "ppc-of-ohci", | ||
248 | .match_table = ohci_hcd_ppc_of_match, | ||
249 | .probe = ohci_hcd_ppc_of_probe, | 247 | .probe = ohci_hcd_ppc_of_probe, |
250 | .remove = ohci_hcd_ppc_of_remove, | 248 | .remove = ohci_hcd_ppc_of_remove, |
251 | .shutdown = ohci_hcd_ppc_of_shutdown, | 249 | .shutdown = ohci_hcd_ppc_of_shutdown, |
252 | #ifdef CONFIG_PM | 250 | .driver = { |
253 | /*.suspend = ohci_hcd_ppc_soc_drv_suspend,*/ | 251 | .name = "ppc-of-ohci", |
254 | /*.resume = ohci_hcd_ppc_soc_drv_resume,*/ | 252 | .owner = THIS_MODULE, |
255 | #endif | 253 | .of_match_table = ohci_hcd_ppc_of_match, |
256 | .driver = { | ||
257 | .name = "ppc-of-ohci", | ||
258 | .owner = THIS_MODULE, | ||
259 | }, | 254 | }, |
260 | }; | 255 | }; |
261 | 256 | ||
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c index e7fa3644ba6a..61c76b13f0f1 100644 --- a/drivers/usb/mon/mon_bin.c +++ b/drivers/usb/mon/mon_bin.c | |||
@@ -954,8 +954,7 @@ static int mon_bin_queued(struct mon_reader_bin *rp) | |||
954 | 954 | ||
955 | /* | 955 | /* |
956 | */ | 956 | */ |
957 | static int mon_bin_ioctl(struct inode *inode, struct file *file, | 957 | static int mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
958 | unsigned int cmd, unsigned long arg) | ||
959 | { | 958 | { |
960 | struct mon_reader_bin *rp = file->private_data; | 959 | struct mon_reader_bin *rp = file->private_data; |
961 | // struct mon_bus* mbus = rp->r.m_bus; | 960 | // struct mon_bus* mbus = rp->r.m_bus; |
@@ -1095,6 +1094,19 @@ static int mon_bin_ioctl(struct inode *inode, struct file *file, | |||
1095 | return ret; | 1094 | return ret; |
1096 | } | 1095 | } |
1097 | 1096 | ||
1097 | static long mon_bin_unlocked_ioctl(struct file *file, unsigned int cmd, | ||
1098 | unsigned long arg) | ||
1099 | { | ||
1100 | int ret; | ||
1101 | |||
1102 | lock_kernel(); | ||
1103 | ret = mon_bin_ioctl(file, cmd, arg); | ||
1104 | unlock_kernel(); | ||
1105 | |||
1106 | return ret; | ||
1107 | } | ||
1108 | |||
1109 | |||
1098 | #ifdef CONFIG_COMPAT | 1110 | #ifdef CONFIG_COMPAT |
1099 | static long mon_bin_compat_ioctl(struct file *file, | 1111 | static long mon_bin_compat_ioctl(struct file *file, |
1100 | unsigned int cmd, unsigned long arg) | 1112 | unsigned int cmd, unsigned long arg) |
@@ -1148,14 +1160,13 @@ static long mon_bin_compat_ioctl(struct file *file, | |||
1148 | return 0; | 1160 | return 0; |
1149 | 1161 | ||
1150 | case MON_IOCG_STATS: | 1162 | case MON_IOCG_STATS: |
1151 | return mon_bin_ioctl(NULL, file, cmd, | 1163 | return mon_bin_ioctl(file, cmd, (unsigned long) compat_ptr(arg)); |
1152 | (unsigned long) compat_ptr(arg)); | ||
1153 | 1164 | ||
1154 | case MON_IOCQ_URB_LEN: | 1165 | case MON_IOCQ_URB_LEN: |
1155 | case MON_IOCQ_RING_SIZE: | 1166 | case MON_IOCQ_RING_SIZE: |
1156 | case MON_IOCT_RING_SIZE: | 1167 | case MON_IOCT_RING_SIZE: |
1157 | case MON_IOCH_MFLUSH: | 1168 | case MON_IOCH_MFLUSH: |
1158 | return mon_bin_ioctl(NULL, file, cmd, arg); | 1169 | return mon_bin_ioctl(file, cmd, arg); |
1159 | 1170 | ||
1160 | default: | 1171 | default: |
1161 | ; | 1172 | ; |
@@ -1239,7 +1250,7 @@ static const struct file_operations mon_fops_binary = { | |||
1239 | .read = mon_bin_read, | 1250 | .read = mon_bin_read, |
1240 | /* .write = mon_text_write, */ | 1251 | /* .write = mon_text_write, */ |
1241 | .poll = mon_bin_poll, | 1252 | .poll = mon_bin_poll, |
1242 | .ioctl = mon_bin_ioctl, | 1253 | .unlocked_ioctl = mon_bin_unlocked_ioctl, |
1243 | #ifdef CONFIG_COMPAT | 1254 | #ifdef CONFIG_COMPAT |
1244 | .compat_ioctl = mon_bin_compat_ioctl, | 1255 | .compat_ioctl = mon_bin_compat_ioctl, |
1245 | #endif | 1256 | #endif |
diff --git a/drivers/usb/mon/mon_stat.c b/drivers/usb/mon/mon_stat.c index 1becdc3837e6..8ec94f15a738 100644 --- a/drivers/usb/mon/mon_stat.c +++ b/drivers/usb/mon/mon_stat.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/slab.h> | 11 | #include <linux/slab.h> |
12 | #include <linux/usb.h> | 12 | #include <linux/usb.h> |
13 | #include <linux/fs.h> | 13 | #include <linux/fs.h> |
14 | #include <linux/smp_lock.h> | ||
14 | #include <asm/uaccess.h> | 15 | #include <asm/uaccess.h> |
15 | 16 | ||
16 | #include "usb_mon.h" | 17 | #include "usb_mon.h" |
@@ -63,6 +64,6 @@ const struct file_operations mon_fops_stat = { | |||
63 | .read = mon_stat_read, | 64 | .read = mon_stat_read, |
64 | /* .write = mon_stat_write, */ | 65 | /* .write = mon_stat_write, */ |
65 | /* .poll = mon_stat_poll, */ | 66 | /* .poll = mon_stat_poll, */ |
66 | /* .ioctl = mon_stat_ioctl, */ | 67 | /* .unlocked_ioctl = mon_stat_ioctl, */ |
67 | .release = mon_stat_release, | 68 | .release = mon_stat_release, |
68 | }; | 69 | }; |