diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-05-29 03:29:38 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-05-29 03:29:38 -0400 |
commit | 65cde54b8b0299d7e46b8705338b01d1e44a5eb0 (patch) | |
tree | 2aa4c3ab303fd19440c636edaecdb0976f9d82c7 /drivers/usb/input/mtouchusb.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/mtouchusb.c')
-rw-r--r-- | drivers/usb/input/mtouchusb.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c index ec1dd6278f7..09b5cc7c66d 100644 --- a/drivers/usb/input/mtouchusb.c +++ b/drivers/usb/input/mtouchusb.c | |||
@@ -98,7 +98,6 @@ struct mtouch_usb { | |||
98 | struct urb *irq; | 98 | struct urb *irq; |
99 | struct usb_device *udev; | 99 | struct usb_device *udev; |
100 | struct input_dev input; | 100 | struct input_dev input; |
101 | int open; | ||
102 | char name[128]; | 101 | char name[128]; |
103 | char phys[64]; | 102 | char phys[64]; |
104 | }; | 103 | }; |
@@ -155,15 +154,10 @@ static int mtouchusb_open(struct input_dev *input) | |||
155 | { | 154 | { |
156 | struct mtouch_usb *mtouch = input->private; | 155 | struct mtouch_usb *mtouch = input->private; |
157 | 156 | ||
158 | if (mtouch->open++) | ||
159 | return 0; | ||
160 | |||
161 | mtouch->irq->dev = mtouch->udev; | 157 | mtouch->irq->dev = mtouch->udev; |
162 | 158 | ||
163 | if (usb_submit_urb(mtouch->irq, GFP_ATOMIC)) { | 159 | if (usb_submit_urb(mtouch->irq, GFP_ATOMIC)) |
164 | mtouch->open--; | ||
165 | return -EIO; | 160 | return -EIO; |
166 | } | ||
167 | 161 | ||
168 | return 0; | 162 | return 0; |
169 | } | 163 | } |
@@ -172,8 +166,7 @@ static void mtouchusb_close(struct input_dev *input) | |||
172 | { | 166 | { |
173 | struct mtouch_usb *mtouch = input->private; | 167 | struct mtouch_usb *mtouch = input->private; |
174 | 168 | ||
175 | if (!--mtouch->open) | 169 | usb_kill_urb(mtouch->irq); |
176 | usb_kill_urb(mtouch->irq); | ||
177 | } | 170 | } |
178 | 171 | ||
179 | static int mtouchusb_alloc_buffers(struct usb_device *udev, struct mtouch_usb *mtouch) | 172 | static int mtouchusb_alloc_buffers(struct usb_device *udev, struct mtouch_usb *mtouch) |