diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-04-21 01:06:53 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-04-21 01:34:36 -0400 |
commit | 331cb022d3ac1f85f7842a51495c33c629e947bc (patch) | |
tree | d913e238f074bf6f8fcdbc88cf3c02bb2f8631d3 /drivers | |
parent | ee7aa6ce41e08c68f72b5ca8f14fb61286dc2418 (diff) |
Input: kbtab - simplify kbtab_disconnect()
There is no need to check whether kbtab 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 kbtab_disconnect() since it
is being called in kbtab_close().
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/input/tablet/kbtab.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/input/tablet/kbtab.c b/drivers/input/tablet/kbtab.c index 76b5d526cde9..3f7d1254b8ed 100644 --- a/drivers/input/tablet/kbtab.c +++ b/drivers/input/tablet/kbtab.c | |||
@@ -193,13 +193,11 @@ static void kbtab_disconnect(struct usb_interface *intf) | |||
193 | struct kbtab *kbtab = usb_get_intfdata(intf); | 193 | struct kbtab *kbtab = usb_get_intfdata(intf); |
194 | 194 | ||
195 | usb_set_intfdata(intf, NULL); | 195 | usb_set_intfdata(intf, NULL); |
196 | if (kbtab) { | 196 | |
197 | usb_kill_urb(kbtab->irq); | 197 | input_unregister_device(kbtab->dev); |
198 | input_unregister_device(kbtab->dev); | 198 | usb_free_urb(kbtab->irq); |
199 | usb_free_urb(kbtab->irq); | 199 | usb_buffer_free(kbtab->usbdev, 8, kbtab->data, kbtab->data_dma); |
200 | usb_buffer_free(interface_to_usbdev(intf), 8, kbtab->data, kbtab->data_dma); | 200 | kfree(kbtab); |
201 | kfree(kbtab); | ||
202 | } | ||
203 | } | 201 | } |
204 | 202 | ||
205 | static struct usb_driver kbtab_driver = { | 203 | static struct usb_driver kbtab_driver = { |