summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2010-04-20 22:20:37 -0700
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2010-04-20 22:34:15 -0700
commit5492f6f801c81c9663417cd8e48e759775977c83 (patch)
treebe42bad032477cf565e939f50af5978fd576178f
parent2ef2ed597669f5e120d0c51c295f00e34b2f0801 (diff)
Input: acecad - simplify usb_acecad_disconnect()
There is no need to check whether acecad structure is attached to the interface; if it isn't and we are called we have much bigger problems. Also no need to call usb_kill_urb() in usb_acecad_disconnect() since it is being called in usb_acecad_close(). Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r--drivers/input/tablet/acecad.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c
index 265753c7630..1697ec2c308 100644
--- a/drivers/input/tablet/acecad.c
+++ b/drivers/input/tablet/acecad.c
@@ -252,13 +252,11 @@ static void usb_acecad_disconnect(struct usb_interface *intf)
struct usb_acecad *acecad = usb_get_intfdata(intf);
usb_set_intfdata(intf, NULL);
- if (acecad) {
- usb_kill_urb(acecad->irq);
- input_unregister_device(acecad->input);
- usb_free_urb(acecad->irq);
- usb_buffer_free(interface_to_usbdev(intf), 8, acecad->data, acecad->data_dma);
- kfree(acecad);
- }
+
+ input_unregister_device(acecad->input);
+ usb_free_urb(acecad->irq);
+ usb_buffer_free(acecad->usbdev, 8, acecad->data, acecad->data_dma);
+ kfree(acecad);
}
static struct usb_device_id usb_acecad_id_table [] = {