diff options
author | Dmitry Torokhov | 2005-05-29 09:29:38 +0200 |
---|---|---|
committer | Dmitry Torokhov | 2005-05-29 09:29:38 +0200 |
commit | 65cde54b8b0299d7e46b8705338b01d1e44a5eb0 (patch) | |
tree | 2aa4c3ab303fd19440c636edaecdb0976f9d82c7 /drivers/usb/input/usbmouse.c | |
parent | Input: remove user counters from drivers/input/mouse since input (diff) | |
download | kernel-qcow2-linux-65cde54b8b0299d7e46b8705338b01d1e44a5eb0.tar.gz kernel-qcow2-linux-65cde54b8b0299d7e46b8705338b01d1e44a5eb0.tar.xz kernel-qcow2-linux-65cde54b8b0299d7e46b8705338b01d1e44a5eb0.zip |
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/usbmouse.c')
-rw-r--r-- | drivers/usb/input/usbmouse.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/input/usbmouse.c b/drivers/usb/input/usbmouse.c index 8ca2811fd174..1ec41b5effe6 100644 --- a/drivers/usb/input/usbmouse.c +++ b/drivers/usb/input/usbmouse.c @@ -51,7 +51,6 @@ struct usb_mouse { struct usb_device *usbdev; struct input_dev dev; struct urb *irq; - int open; signed char *data; dma_addr_t data_dma; @@ -101,14 +100,9 @@ static int usb_mouse_open(struct input_dev *dev) { struct usb_mouse *mouse = dev->private; - if (mouse->open++) - return 0; - mouse->irq->dev = mouse->usbdev; - if (usb_submit_urb(mouse->irq, GFP_KERNEL)) { - mouse->open--; + if (usb_submit_urb(mouse->irq, GFP_KERNEL)) return -EIO; - } return 0; } @@ -117,8 +111,7 @@ static void usb_mouse_close(struct input_dev *dev) { struct usb_mouse *mouse = dev->private; - if (!--mouse->open) - usb_kill_urb(mouse->irq); + usb_kill_urb(mouse->irq); } static int usb_mouse_probe(struct usb_interface * intf, const struct usb_device_id * id) |