diff options
Diffstat (limited to 'drivers/usb/input/appletouch.c')
-rw-r--r-- | drivers/usb/input/appletouch.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/usb/input/appletouch.c b/drivers/usb/input/appletouch.c index 36855062eacc..0aa9cc2bfd69 100644 --- a/drivers/usb/input/appletouch.c +++ b/drivers/usb/input/appletouch.c | |||
@@ -27,7 +27,6 @@ | |||
27 | * | 27 | * |
28 | */ | 28 | */ |
29 | 29 | ||
30 | #include <linux/config.h> | ||
31 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
32 | #include <linux/errno.h> | 31 | #include <linux/errno.h> |
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
@@ -437,10 +436,7 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id | |||
437 | iface_desc = iface->cur_altsetting; | 436 | iface_desc = iface->cur_altsetting; |
438 | for (i = 0; i < iface_desc->desc.bNumEndpoints; i++) { | 437 | for (i = 0; i < iface_desc->desc.bNumEndpoints; i++) { |
439 | endpoint = &iface_desc->endpoint[i].desc; | 438 | endpoint = &iface_desc->endpoint[i].desc; |
440 | if (!int_in_endpointAddr && | 439 | if (!int_in_endpointAddr && usb_endpoint_is_int_in(endpoint)) { |
441 | (endpoint->bEndpointAddress & USB_DIR_IN) && | ||
442 | ((endpoint->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK) | ||
443 | == USB_ENDPOINT_XFER_INT)) { | ||
444 | /* we found an interrupt in endpoint */ | 440 | /* we found an interrupt in endpoint */ |
445 | int_in_endpointAddr = endpoint->bEndpointAddress; | 441 | int_in_endpointAddr = endpoint->bEndpointAddress; |
446 | break; | 442 | break; |
@@ -598,9 +594,9 @@ static void atp_disconnect(struct usb_interface *iface) | |||
598 | if (dev) { | 594 | if (dev) { |
599 | usb_kill_urb(dev->urb); | 595 | usb_kill_urb(dev->urb); |
600 | input_unregister_device(dev->input); | 596 | input_unregister_device(dev->input); |
601 | usb_free_urb(dev->urb); | ||
602 | usb_buffer_free(dev->udev, dev->datalen, | 597 | usb_buffer_free(dev->udev, dev->datalen, |
603 | dev->data, dev->urb->transfer_dma); | 598 | dev->data, dev->urb->transfer_dma); |
599 | usb_free_urb(dev->urb); | ||
604 | kfree(dev); | 600 | kfree(dev); |
605 | } | 601 | } |
606 | printk(KERN_INFO "input: appletouch disconnected\n"); | 602 | printk(KERN_INFO "input: appletouch disconnected\n"); |