diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-05-29 02:29:38 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-05-29 02:29:38 -0500 |
commit | 65cde54b8b0299d7e46b8705338b01d1e44a5eb0 (patch) | |
tree | 2aa4c3ab303fd19440c636edaecdb0976f9d82c7 /drivers/usb/input/touchkitusb.c | |
parent | 3108d42de4da0823feb37a55db62acdc01554625 (diff) |
Input: remove user counters from drivers/usb/input since input
core takes care of calling open and close methods only
when needed.
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/usb/input/touchkitusb.c')
-rw-r--r-- | drivers/usb/input/touchkitusb.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/input/touchkitusb.c b/drivers/usb/input/touchkitusb.c index a71f1bbd0a1..386595ee21c 100644 --- a/drivers/usb/input/touchkitusb.c +++ b/drivers/usb/input/touchkitusb.c @@ -69,7 +69,6 @@ struct touchkit_usb { struct urb *irq; struct usb_device *udev; struct input_dev input; - int open; char name[128]; char phys[64]; }; @@ -134,15 +133,10 @@ static int touchkit_open(struct input_dev *input) { struct touchkit_usb *touchkit = input->private; - if (touchkit->open++) - return 0; - touchkit->irq->dev = touchkit->udev; - if (usb_submit_urb(touchkit->irq, GFP_ATOMIC)) { - touchkit->open--; + if (usb_submit_urb(touchkit->irq, GFP_ATOMIC)) return -EIO; - } return 0; } @@ -151,8 +145,7 @@ static void touchkit_close(struct input_dev *input) { struct touchkit_usb *touchkit = input->private; - if (!--touchkit->open) - usb_kill_urb(touchkit->irq); + usb_kill_urb(touchkit->irq); } static int touchkit_alloc_buffers(struct usb_device *udev, |