diff options
author | David Howells <dhowells@redhat.com> | 2006-12-05 09:37:56 -0500 |
---|---|---|
committer | David Howells <dhowells@warthog.cambridge.redhat.com> | 2006-12-05 09:37:56 -0500 |
commit | 4c1ac1b49122b805adfa4efc620592f68dccf5db (patch) | |
tree | 87557f4bc2fd4fe65b7570489c2f610c45c0adcd /drivers/usb/misc | |
parent | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (diff) | |
parent | d916faace3efc0bf19fe9a615a1ab8fa1a24cd93 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/infiniband/core/iwcm.c
drivers/net/chelsio/cxgb2.c
drivers/net/wireless/bcm43xx/bcm43xx_main.c
drivers/net/wireless/prism54/islpci_eth.c
drivers/usb/core/hub.h
drivers/usb/input/hid-core.c
net/core/netpoll.c
Fix up merge failures with Linus's head and fix new compilation failures.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/usb/misc')
-rw-r--r-- | drivers/usb/misc/Makefile | 1 | ||||
-rw-r--r-- | drivers/usb/misc/appledisplay.c | 5 | ||||
-rw-r--r-- | drivers/usb/misc/auerswald.c | 7 | ||||
-rw-r--r-- | drivers/usb/misc/emi26.c | 3 | ||||
-rw-r--r-- | drivers/usb/misc/emi62.c | 3 | ||||
-rw-r--r-- | drivers/usb/misc/ftdi-elan.c | 20 | ||||
-rw-r--r-- | drivers/usb/misc/idmouse.c | 22 | ||||
-rw-r--r-- | drivers/usb/misc/legousbtower.c | 31 | ||||
-rw-r--r-- | drivers/usb/misc/phidgetkit.c | 5 | ||||
-rw-r--r-- | drivers/usb/misc/phidgetmotorcontrol.c | 5 | ||||
-rw-r--r-- | drivers/usb/misc/usb_u132.h | 6 | ||||
-rw-r--r-- | drivers/usb/misc/usbtest.c | 4 |
12 files changed, 39 insertions, 73 deletions
diff --git a/drivers/usb/misc/Makefile b/drivers/usb/misc/Makefile index 11dc59540cda..2cba07d31971 100644 --- a/drivers/usb/misc/Makefile +++ b/drivers/usb/misc/Makefile | |||
@@ -4,6 +4,7 @@ | |||
4 | # | 4 | # |
5 | 5 | ||
6 | obj-$(CONFIG_USB_ADUTUX) += adutux.o | 6 | obj-$(CONFIG_USB_ADUTUX) += adutux.o |
7 | obj-$(CONFIG_USB_APPLEDISPLAY) += appledisplay.o | ||
7 | obj-$(CONFIG_USB_AUERSWALD) += auerswald.o | 8 | obj-$(CONFIG_USB_AUERSWALD) += auerswald.o |
8 | obj-$(CONFIG_USB_CYPRESS_CY7C63)+= cypress_cy7c63.o | 9 | obj-$(CONFIG_USB_CYPRESS_CY7C63)+= cypress_cy7c63.o |
9 | obj-$(CONFIG_USB_CYTHERM) += cytherm.o | 10 | obj-$(CONFIG_USB_CYTHERM) += cytherm.o |
diff --git a/drivers/usb/misc/appledisplay.c b/drivers/usb/misc/appledisplay.c index 6b23a1def9fe..ba30ca6a14aa 100644 --- a/drivers/usb/misc/appledisplay.c +++ b/drivers/usb/misc/appledisplay.c | |||
@@ -216,10 +216,7 @@ static int appledisplay_probe(struct usb_interface *iface, | |||
216 | iface_desc = iface->cur_altsetting; | 216 | iface_desc = iface->cur_altsetting; |
217 | for (i = 0; i < iface_desc->desc.bNumEndpoints; i++) { | 217 | for (i = 0; i < iface_desc->desc.bNumEndpoints; i++) { |
218 | endpoint = &iface_desc->endpoint[i].desc; | 218 | endpoint = &iface_desc->endpoint[i].desc; |
219 | if (!int_in_endpointAddr && | 219 | if (!int_in_endpointAddr && usb_endpoint_is_int_in(endpoint)) { |
220 | (endpoint->bEndpointAddress & USB_DIR_IN) && | ||
221 | ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
222 | USB_ENDPOINT_XFER_INT)) { | ||
223 | /* we found an interrupt in endpoint */ | 220 | /* we found an interrupt in endpoint */ |
224 | int_in_endpointAddr = endpoint->bEndpointAddress; | 221 | int_in_endpointAddr = endpoint->bEndpointAddress; |
225 | break; | 222 | break; |
diff --git a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c index e4971d6aaafb..c703f73e1655 100644 --- a/drivers/usb/misc/auerswald.c +++ b/drivers/usb/misc/auerswald.c | |||
@@ -704,9 +704,7 @@ static void auerbuf_free (pauerbuf_t bp) | |||
704 | { | 704 | { |
705 | kfree(bp->bufp); | 705 | kfree(bp->bufp); |
706 | kfree(bp->dr); | 706 | kfree(bp->dr); |
707 | if (bp->urbp) { | 707 | usb_free_urb(bp->urbp); |
708 | usb_free_urb(bp->urbp); | ||
709 | } | ||
710 | kfree(bp); | 708 | kfree(bp); |
711 | } | 709 | } |
712 | 710 | ||
@@ -1155,8 +1153,7 @@ static void auerswald_int_release (pauerswald_t cp) | |||
1155 | dbg ("auerswald_int_release"); | 1153 | dbg ("auerswald_int_release"); |
1156 | 1154 | ||
1157 | /* stop the int endpoint */ | 1155 | /* stop the int endpoint */ |
1158 | if (cp->inturbp) | 1156 | usb_kill_urb (cp->inturbp); |
1159 | usb_kill_urb (cp->inturbp); | ||
1160 | 1157 | ||
1161 | /* deallocate memory */ | 1158 | /* deallocate memory */ |
1162 | auerswald_int_free (cp); | 1159 | auerswald_int_free (cp); |
diff --git a/drivers/usb/misc/emi26.c b/drivers/usb/misc/emi26.c index 1fd9cb85f4ca..5c0a26cbd128 100644 --- a/drivers/usb/misc/emi26.c +++ b/drivers/usb/misc/emi26.c | |||
@@ -53,13 +53,12 @@ static void __exit emi26_exit (void); | |||
53 | static int emi26_writememory (struct usb_device *dev, int address, unsigned char *data, int length, __u8 request) | 53 | static int emi26_writememory (struct usb_device *dev, int address, unsigned char *data, int length, __u8 request) |
54 | { | 54 | { |
55 | int result; | 55 | int result; |
56 | unsigned char *buffer = kmalloc (length, GFP_KERNEL); | 56 | unsigned char *buffer = kmemdup(data, length, GFP_KERNEL); |
57 | 57 | ||
58 | if (!buffer) { | 58 | if (!buffer) { |
59 | err("emi26: kmalloc(%d) failed.", length); | 59 | err("emi26: kmalloc(%d) failed.", length); |
60 | return -ENOMEM; | 60 | return -ENOMEM; |
61 | } | 61 | } |
62 | memcpy (buffer, data, length); | ||
63 | /* Note: usb_control_msg returns negative value on error or length of the | 62 | /* Note: usb_control_msg returns negative value on error or length of the |
64 | * data that was written! */ | 63 | * data that was written! */ |
65 | result = usb_control_msg (dev, usb_sndctrlpipe(dev, 0), request, 0x40, address, 0, buffer, length, 300); | 64 | result = usb_control_msg (dev, usb_sndctrlpipe(dev, 0), request, 0x40, address, 0, buffer, length, 300); |
diff --git a/drivers/usb/misc/emi62.c b/drivers/usb/misc/emi62.c index fe351371f274..23153eac0dfa 100644 --- a/drivers/usb/misc/emi62.c +++ b/drivers/usb/misc/emi62.c | |||
@@ -61,13 +61,12 @@ static void __exit emi62_exit (void); | |||
61 | static int emi62_writememory (struct usb_device *dev, int address, unsigned char *data, int length, __u8 request) | 61 | static int emi62_writememory (struct usb_device *dev, int address, unsigned char *data, int length, __u8 request) |
62 | { | 62 | { |
63 | int result; | 63 | int result; |
64 | unsigned char *buffer = kmalloc (length, GFP_KERNEL); | 64 | unsigned char *buffer = kmemdup(data, length, GFP_KERNEL); |
65 | 65 | ||
66 | if (!buffer) { | 66 | if (!buffer) { |
67 | err("emi62: kmalloc(%d) failed.", length); | 67 | err("emi62: kmalloc(%d) failed.", length); |
68 | return -ENOMEM; | 68 | return -ENOMEM; |
69 | } | 69 | } |
70 | memcpy (buffer, data, length); | ||
71 | /* Note: usb_control_msg returns negative value on error or length of the | 70 | /* Note: usb_control_msg returns negative value on error or length of the |
72 | * data that was written! */ | 71 | * data that was written! */ |
73 | result = usb_control_msg (dev, usb_sndctrlpipe(dev, 0), request, 0x40, address, 0, buffer, length, 300); | 72 | result = usb_control_msg (dev, usb_sndctrlpipe(dev, 0), request, 0x40, address, 0, buffer, length, 300); |
diff --git a/drivers/usb/misc/ftdi-elan.c b/drivers/usb/misc/ftdi-elan.c index e4e2cf2ba915..18b1925032a8 100644 --- a/drivers/usb/misc/ftdi-elan.c +++ b/drivers/usb/misc/ftdi-elan.c | |||
@@ -272,7 +272,7 @@ void ftdi_elan_gone_away(struct platform_device *pdev) | |||
272 | 272 | ||
273 | 273 | ||
274 | EXPORT_SYMBOL_GPL(ftdi_elan_gone_away); | 274 | EXPORT_SYMBOL_GPL(ftdi_elan_gone_away); |
275 | void ftdi_release_platform_dev(struct device *dev) | 275 | static void ftdi_release_platform_dev(struct device *dev) |
276 | { | 276 | { |
277 | dev->parent = NULL; | 277 | dev->parent = NULL; |
278 | } | 278 | } |
@@ -1399,14 +1399,6 @@ static int ftdi_elan_read_reg(struct usb_ftdi *ftdi, u32 *data) | |||
1399 | } | 1399 | } |
1400 | } | 1400 | } |
1401 | 1401 | ||
1402 | int usb_ftdi_elan_read_reg(struct platform_device *pdev, u32 *data) | ||
1403 | { | ||
1404 | struct usb_ftdi *ftdi = platform_device_to_usb_ftdi(pdev); | ||
1405 | return ftdi_elan_read_reg(ftdi, data); | ||
1406 | } | ||
1407 | |||
1408 | |||
1409 | EXPORT_SYMBOL_GPL(usb_ftdi_elan_read_reg); | ||
1410 | static int ftdi_elan_read_config(struct usb_ftdi *ftdi, int config_offset, | 1402 | static int ftdi_elan_read_config(struct usb_ftdi *ftdi, int config_offset, |
1411 | u8 width, u32 *data) | 1403 | u8 width, u32 *data) |
1412 | { | 1404 | { |
@@ -2606,10 +2598,7 @@ static int ftdi_elan_probe(struct usb_interface *interface, | |||
2606 | for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { | 2598 | for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { |
2607 | endpoint = &iface_desc->endpoint[i].desc; | 2599 | endpoint = &iface_desc->endpoint[i].desc; |
2608 | if (!ftdi->bulk_in_endpointAddr && | 2600 | if (!ftdi->bulk_in_endpointAddr && |
2609 | ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) | 2601 | usb_endpoint_is_bulk_in(endpoint)) { |
2610 | == USB_DIR_IN) && ((endpoint->bmAttributes & | ||
2611 | USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK)) | ||
2612 | { | ||
2613 | buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); | 2602 | buffer_size = le16_to_cpu(endpoint->wMaxPacketSize); |
2614 | ftdi->bulk_in_size = buffer_size; | 2603 | ftdi->bulk_in_size = buffer_size; |
2615 | ftdi->bulk_in_endpointAddr = endpoint->bEndpointAddress; | 2604 | ftdi->bulk_in_endpointAddr = endpoint->bEndpointAddress; |
@@ -2622,10 +2611,7 @@ static int ftdi_elan_probe(struct usb_interface *interface, | |||
2622 | } | 2611 | } |
2623 | } | 2612 | } |
2624 | if (!ftdi->bulk_out_endpointAddr && | 2613 | if (!ftdi->bulk_out_endpointAddr && |
2625 | ((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) | 2614 | usb_endpoint_is_bulk_out(endpoint)) { |
2626 | == USB_DIR_OUT) && ((endpoint->bmAttributes & | ||
2627 | USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_BULK)) | ||
2628 | { | ||
2629 | ftdi->bulk_out_endpointAddr = | 2615 | ftdi->bulk_out_endpointAddr = |
2630 | endpoint->bEndpointAddress; | 2616 | endpoint->bEndpointAddress; |
2631 | } | 2617 | } |
diff --git a/drivers/usb/misc/idmouse.c b/drivers/usb/misc/idmouse.c index 8e6e195a22ba..c9418535bef8 100644 --- a/drivers/usb/misc/idmouse.c +++ b/drivers/usb/misc/idmouse.c | |||
@@ -125,12 +125,12 @@ static DEFINE_MUTEX(disconnect_mutex); | |||
125 | 125 | ||
126 | static int idmouse_create_image(struct usb_idmouse *dev) | 126 | static int idmouse_create_image(struct usb_idmouse *dev) |
127 | { | 127 | { |
128 | int bytes_read = 0; | 128 | int bytes_read; |
129 | int bulk_read = 0; | 129 | int bulk_read; |
130 | int result = 0; | 130 | int result; |
131 | 131 | ||
132 | memcpy(dev->bulk_in_buffer, HEADER, sizeof(HEADER)-1); | 132 | memcpy(dev->bulk_in_buffer, HEADER, sizeof(HEADER)-1); |
133 | bytes_read += sizeof(HEADER)-1; | 133 | bytes_read = sizeof(HEADER)-1; |
134 | 134 | ||
135 | /* reset the device and set a fast blink rate */ | 135 | /* reset the device and set a fast blink rate */ |
136 | result = ftip_command(dev, FTIP_RELEASE, 0, 0); | 136 | result = ftip_command(dev, FTIP_RELEASE, 0, 0); |
@@ -208,9 +208,9 @@ static inline void idmouse_delete(struct usb_idmouse *dev) | |||
208 | 208 | ||
209 | static int idmouse_open(struct inode *inode, struct file *file) | 209 | static int idmouse_open(struct inode *inode, struct file *file) |
210 | { | 210 | { |
211 | struct usb_idmouse *dev = NULL; | 211 | struct usb_idmouse *dev; |
212 | struct usb_interface *interface; | 212 | struct usb_interface *interface; |
213 | int result = 0; | 213 | int result; |
214 | 214 | ||
215 | /* prevent disconnects */ | 215 | /* prevent disconnects */ |
216 | mutex_lock(&disconnect_mutex); | 216 | mutex_lock(&disconnect_mutex); |
@@ -305,7 +305,7 @@ static ssize_t idmouse_read(struct file *file, char __user *buffer, size_t count | |||
305 | loff_t * ppos) | 305 | loff_t * ppos) |
306 | { | 306 | { |
307 | struct usb_idmouse *dev; | 307 | struct usb_idmouse *dev; |
308 | int result = 0; | 308 | int result; |
309 | 309 | ||
310 | dev = (struct usb_idmouse *) file->private_data; | 310 | dev = (struct usb_idmouse *) file->private_data; |
311 | 311 | ||
@@ -329,7 +329,7 @@ static int idmouse_probe(struct usb_interface *interface, | |||
329 | const struct usb_device_id *id) | 329 | const struct usb_device_id *id) |
330 | { | 330 | { |
331 | struct usb_device *udev = interface_to_usbdev(interface); | 331 | struct usb_device *udev = interface_to_usbdev(interface); |
332 | struct usb_idmouse *dev = NULL; | 332 | struct usb_idmouse *dev; |
333 | struct usb_host_interface *iface_desc; | 333 | struct usb_host_interface *iface_desc; |
334 | struct usb_endpoint_descriptor *endpoint; | 334 | struct usb_endpoint_descriptor *endpoint; |
335 | int result; | 335 | int result; |
@@ -350,11 +350,7 @@ static int idmouse_probe(struct usb_interface *interface, | |||
350 | 350 | ||
351 | /* set up the endpoint information - use only the first bulk-in endpoint */ | 351 | /* set up the endpoint information - use only the first bulk-in endpoint */ |
352 | endpoint = &iface_desc->endpoint[0].desc; | 352 | endpoint = &iface_desc->endpoint[0].desc; |
353 | if (!dev->bulk_in_endpointAddr | 353 | if (!dev->bulk_in_endpointAddr && usb_endpoint_is_bulk_in(endpoint)) { |
354 | && (endpoint->bEndpointAddress & USB_DIR_IN) | ||
355 | && ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == | ||
356 | USB_ENDPOINT_XFER_BULK)) { | ||
357 | |||
358 | /* we found a bulk in endpoint */ | 354 | /* we found a bulk in endpoint */ |
359 | dev->orig_bi_size = le16_to_cpu(endpoint->wMaxPacketSize); | 355 | dev->orig_bi_size = le16_to_cpu(endpoint->wMaxPacketSize); |
360 | dev->bulk_in_size = 0x200; /* works _much_ faster */ | 356 | dev->bulk_in_size = 0x200; /* works _much_ faster */ |
diff --git a/drivers/usb/misc/legousbtower.c b/drivers/usb/misc/legousbtower.c index 27089497e717..5dce797bddb7 100644 --- a/drivers/usb/misc/legousbtower.c +++ b/drivers/usb/misc/legousbtower.c | |||
@@ -317,12 +317,8 @@ static inline void tower_delete (struct lego_usb_tower *dev) | |||
317 | tower_abort_transfers (dev); | 317 | tower_abort_transfers (dev); |
318 | 318 | ||
319 | /* free data structures */ | 319 | /* free data structures */ |
320 | if (dev->interrupt_in_urb != NULL) { | 320 | usb_free_urb(dev->interrupt_in_urb); |
321 | usb_free_urb (dev->interrupt_in_urb); | 321 | usb_free_urb(dev->interrupt_out_urb); |
322 | } | ||
323 | if (dev->interrupt_out_urb != NULL) { | ||
324 | usb_free_urb (dev->interrupt_out_urb); | ||
325 | } | ||
326 | kfree (dev->read_buffer); | 322 | kfree (dev->read_buffer); |
327 | kfree (dev->interrupt_in_buffer); | 323 | kfree (dev->interrupt_in_buffer); |
328 | kfree (dev->interrupt_out_buffer); | 324 | kfree (dev->interrupt_out_buffer); |
@@ -502,15 +498,11 @@ static void tower_abort_transfers (struct lego_usb_tower *dev) | |||
502 | if (dev->interrupt_in_running) { | 498 | if (dev->interrupt_in_running) { |
503 | dev->interrupt_in_running = 0; | 499 | dev->interrupt_in_running = 0; |
504 | mb(); | 500 | mb(); |
505 | if (dev->interrupt_in_urb != NULL && dev->udev) { | 501 | if (dev->udev) |
506 | usb_kill_urb (dev->interrupt_in_urb); | 502 | usb_kill_urb (dev->interrupt_in_urb); |
507 | } | ||
508 | } | ||
509 | if (dev->interrupt_out_busy) { | ||
510 | if (dev->interrupt_out_urb != NULL && dev->udev) { | ||
511 | usb_kill_urb (dev->interrupt_out_urb); | ||
512 | } | ||
513 | } | 503 | } |
504 | if (dev->interrupt_out_busy && dev->udev) | ||
505 | usb_kill_urb(dev->interrupt_out_urb); | ||
514 | 506 | ||
515 | exit: | 507 | exit: |
516 | dbg(2, "%s: leave", __FUNCTION__); | 508 | dbg(2, "%s: leave", __FUNCTION__); |
@@ -898,14 +890,11 @@ static int tower_probe (struct usb_interface *interface, const struct usb_device | |||
898 | for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { | 890 | for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) { |
899 | endpoint = &iface_desc->endpoint[i].desc; | 891 | endpoint = &iface_desc->endpoint[i].desc; |
900 | 892 | ||
901 | if (((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_IN) && | 893 | if (usb_endpoint_xfer_int(endpoint)) { |
902 | ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) { | 894 | if (usb_endpoint_dir_in(endpoint)) |
903 | dev->interrupt_in_endpoint = endpoint; | 895 | dev->interrupt_in_endpoint = endpoint; |
904 | } | 896 | else |
905 | 897 | dev->interrupt_out_endpoint = endpoint; | |
906 | if (((endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK) == USB_DIR_OUT) && | ||
907 | ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) == USB_ENDPOINT_XFER_INT)) { | ||
908 | dev->interrupt_out_endpoint = endpoint; | ||
909 | } | 898 | } |
910 | } | 899 | } |
911 | if(dev->interrupt_in_endpoint == NULL) { | 900 | if(dev->interrupt_in_endpoint == NULL) { |
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c index 33e716c6a79b..9659c79e187e 100644 --- a/drivers/usb/misc/phidgetkit.c +++ b/drivers/usb/misc/phidgetkit.c | |||
@@ -554,7 +554,7 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic | |||
554 | return -ENODEV; | 554 | return -ENODEV; |
555 | 555 | ||
556 | endpoint = &interface->endpoint[0].desc; | 556 | endpoint = &interface->endpoint[0].desc; |
557 | if (!(endpoint->bEndpointAddress & 0x80)) | 557 | if (!usb_endpoint_dir_in(endpoint)) |
558 | return -ENODEV; | 558 | return -ENODEV; |
559 | /* | 559 | /* |
560 | * bmAttributes | 560 | * bmAttributes |
@@ -653,8 +653,7 @@ out2: | |||
653 | device_remove_file(kit->dev, &dev_output_attrs[i]); | 653 | device_remove_file(kit->dev, &dev_output_attrs[i]); |
654 | out: | 654 | out: |
655 | if (kit) { | 655 | if (kit) { |
656 | if (kit->irq) | 656 | usb_free_urb(kit->irq); |
657 | usb_free_urb(kit->irq); | ||
658 | if (kit->data) | 657 | if (kit->data) |
659 | usb_buffer_free(dev, URB_INT_SIZE, kit->data, kit->data_dma); | 658 | usb_buffer_free(dev, URB_INT_SIZE, kit->data, kit->data_dma); |
660 | if (kit->dev) | 659 | if (kit->dev) |
diff --git a/drivers/usb/misc/phidgetmotorcontrol.c b/drivers/usb/misc/phidgetmotorcontrol.c index 0385ffcc7419..2bb4fa572bb7 100644 --- a/drivers/usb/misc/phidgetmotorcontrol.c +++ b/drivers/usb/misc/phidgetmotorcontrol.c | |||
@@ -324,7 +324,7 @@ static int motorcontrol_probe(struct usb_interface *intf, const struct usb_devic | |||
324 | return -ENODEV; | 324 | return -ENODEV; |
325 | 325 | ||
326 | endpoint = &interface->endpoint[0].desc; | 326 | endpoint = &interface->endpoint[0].desc; |
327 | if (!(endpoint->bEndpointAddress & 0x80)) | 327 | if (!usb_endpoint_dir_in(endpoint)) |
328 | return -ENODEV; | 328 | return -ENODEV; |
329 | 329 | ||
330 | /* | 330 | /* |
@@ -393,8 +393,7 @@ out2: | |||
393 | device_remove_file(mc->dev, &dev_attrs[i]); | 393 | device_remove_file(mc->dev, &dev_attrs[i]); |
394 | out: | 394 | out: |
395 | if (mc) { | 395 | if (mc) { |
396 | if (mc->irq) | 396 | usb_free_urb(mc->irq); |
397 | usb_free_urb(mc->irq); | ||
398 | if (mc->data) | 397 | if (mc->data) |
399 | usb_buffer_free(dev, URB_INT_SIZE, mc->data, mc->data_dma); | 398 | usb_buffer_free(dev, URB_INT_SIZE, mc->data, mc->data_dma); |
400 | if (mc->dev) | 399 | if (mc->dev) |
diff --git a/drivers/usb/misc/usb_u132.h b/drivers/usb/misc/usb_u132.h index 551ba8906d62..dc2e5a31caec 100644 --- a/drivers/usb/misc/usb_u132.h +++ b/drivers/usb/misc/usb_u132.h | |||
@@ -52,7 +52,7 @@ | |||
52 | * the kernel to load the "u132-hcd" module. | 52 | * the kernel to load the "u132-hcd" module. |
53 | * | 53 | * |
54 | * The "ftdi-u132" module provides the interface to the inserted | 54 | * The "ftdi-u132" module provides the interface to the inserted |
55 | * PC card and the "u132-hcd" module uses the API to send and recieve | 55 | * PC card and the "u132-hcd" module uses the API to send and receive |
56 | * data. The API features call-backs, so that part of the "u132-hcd" | 56 | * data. The API features call-backs, so that part of the "u132-hcd" |
57 | * module code will run in the context of one of the kernel threads | 57 | * module code will run in the context of one of the kernel threads |
58 | * of the "ftdi-u132" module. | 58 | * of the "ftdi-u132" module. |
@@ -95,3 +95,7 @@ int usb_ftdi_elan_edset_setup(struct platform_device *pdev, u8 ed_number, | |||
95 | int halted, int skipped, int actual, int non_null)); | 95 | int halted, int skipped, int actual, int non_null)); |
96 | int usb_ftdi_elan_edset_flush(struct platform_device *pdev, u8 ed_number, | 96 | int usb_ftdi_elan_edset_flush(struct platform_device *pdev, u8 ed_number, |
97 | void *endp); | 97 | void *endp); |
98 | int usb_ftdi_elan_read_pcimem(struct platform_device *pdev, int mem_offset, | ||
99 | u8 width, u32 *data); | ||
100 | int usb_ftdi_elan_write_pcimem(struct platform_device *pdev, int mem_offset, | ||
101 | u8 width, u32 data); | ||
diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 7c2cbdf81d20..194065dbb51f 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drivers/usb/misc/usbtest.c | |||
@@ -138,7 +138,7 @@ get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf) | |||
138 | default: | 138 | default: |
139 | continue; | 139 | continue; |
140 | } | 140 | } |
141 | if (e->desc.bEndpointAddress & USB_DIR_IN) { | 141 | if (usb_endpoint_dir_in(&e->desc)) { |
142 | if (!in) | 142 | if (!in) |
143 | in = e; | 143 | in = e; |
144 | } else { | 144 | } else { |
@@ -147,7 +147,7 @@ get_endpoints (struct usbtest_dev *dev, struct usb_interface *intf) | |||
147 | } | 147 | } |
148 | continue; | 148 | continue; |
149 | try_iso: | 149 | try_iso: |
150 | if (e->desc.bEndpointAddress & USB_DIR_IN) { | 150 | if (usb_endpoint_dir_in(&e->desc)) { |
151 | if (!iso_in) | 151 | if (!iso_in) |
152 | iso_in = e; | 152 | iso_in = e; |
153 | } else { | 153 | } else { |