diff options
Diffstat (limited to 'drivers/usb/input/itmtouch.c')
-rw-r--r-- | drivers/usb/input/itmtouch.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/usb/input/itmtouch.c b/drivers/usb/input/itmtouch.c index 5122a7f701a9..47dec6a1b344 100644 --- a/drivers/usb/input/itmtouch.c +++ b/drivers/usb/input/itmtouch.c | |||
@@ -137,15 +137,10 @@ static int itmtouch_open(struct input_dev *input) | |||
137 | { | 137 | { |
138 | struct itmtouch_dev *itmtouch = input->private; | 138 | struct itmtouch_dev *itmtouch = input->private; |
139 | 139 | ||
140 | if (itmtouch->users++) | ||
141 | return 0; | ||
142 | |||
143 | itmtouch->readurb->dev = itmtouch->usbdev; | 140 | itmtouch->readurb->dev = itmtouch->usbdev; |
144 | 141 | ||
145 | if (usb_submit_urb(itmtouch->readurb, GFP_KERNEL)) { | 142 | if (usb_submit_urb(itmtouch->readurb, GFP_KERNEL)) |
146 | itmtouch->users--; | ||
147 | return -EIO; | 143 | return -EIO; |
148 | } | ||
149 | 144 | ||
150 | return 0; | 145 | return 0; |
151 | } | 146 | } |
@@ -154,8 +149,7 @@ static void itmtouch_close(struct input_dev *input) | |||
154 | { | 149 | { |
155 | struct itmtouch_dev *itmtouch = input->private; | 150 | struct itmtouch_dev *itmtouch = input->private; |
156 | 151 | ||
157 | if (!--itmtouch->users) | 152 | usb_kill_urb(itmtouch->readurb); |
158 | usb_kill_urb(itmtouch->readurb); | ||
159 | } | 153 | } |
160 | 154 | ||
161 | static int itmtouch_probe(struct usb_interface *intf, const struct usb_device_id *id) | 155 | static int itmtouch_probe(struct usb_interface *intf, const struct usb_device_id *id) |