aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/wacom.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-05-29 03:29:38 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2005-05-29 03:29:38 -0400
commit65cde54b8b0299d7e46b8705338b01d1e44a5eb0 (patch)
tree2aa4c3ab303fd19440c636edaecdb0976f9d82c7 /drivers/usb/input/wacom.c
parent3108d42de4da0823feb37a55db62acdc01554625 (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/wacom.c')
-rw-r--r--drivers/usb/input/wacom.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/input/wacom.c b/drivers/usb/input/wacom.c
index b3420e12ae4..e37d31b57b2 100644
--- a/drivers/usb/input/wacom.c
+++ b/drivers/usb/input/wacom.c
@@ -102,7 +102,6 @@ struct wacom {
102 struct urb *irq; 102 struct urb *irq;
103 struct wacom_features *features; 103 struct wacom_features *features;
104 int tool[2]; 104 int tool[2];
105 int open;
106 __u32 serial[2]; 105 __u32 serial[2];
107 char phys[32]; 106 char phys[32];
108}; 107};
@@ -771,14 +770,9 @@ static int wacom_open(struct input_dev *dev)
771{ 770{
772 struct wacom *wacom = dev->private; 771 struct wacom *wacom = dev->private;
773 772
774 if (wacom->open++)
775 return 0;
776
777 wacom->irq->dev = wacom->usbdev; 773 wacom->irq->dev = wacom->usbdev;
778 if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { 774 if (usb_submit_urb(wacom->irq, GFP_KERNEL))
779 wacom->open--;
780 return -EIO; 775 return -EIO;
781 }
782 776
783 return 0; 777 return 0;
784} 778}
@@ -787,8 +781,7 @@ static void wacom_close(struct input_dev *dev)
787{ 781{
788 struct wacom *wacom = dev->private; 782 struct wacom *wacom = dev->private;
789 783
790 if (!--wacom->open) 784 usb_kill_urb(wacom->irq);
791 usb_kill_urb(wacom->irq);
792} 785}
793 786
794static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id) 787static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *id)