summaryrefslogtreecommitdiff
path: root/drivers/usb/input/mtouchusb.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-05-29 07:29:38 (GMT)
committerDmitry Torokhov <dtor_core@ameritech.net>2005-05-29 07:29:38 (GMT)
commit65cde54b8b0299d7e46b8705338b01d1e44a5eb0 (patch)
tree2aa4c3ab303fd19440c636edaecdb0976f9d82c7 /drivers/usb/input/mtouchusb.c
parent3108d42de4da0823feb37a55db62acdc01554625 (diff)
downloadlinux-65cde54b8b0299d7e46b8705338b01d1e44a5eb0.tar.xz
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.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c
index ec1dd62..09b5cc7 100644
--- a/drivers/usb/input/mtouchusb.c
+++ b/drivers/usb/input/mtouchusb.c
@@ -98,7 +98,6 @@ struct mtouch_usb {
struct urb *irq;
struct usb_device *udev;
struct input_dev input;
- int open;
char name[128];
char phys[64];
};
@@ -155,15 +154,10 @@ static int mtouchusb_open(struct input_dev *input)
{
struct mtouch_usb *mtouch = input->private;
- if (mtouch->open++)
- return 0;
-
mtouch->irq->dev = mtouch->udev;
- if (usb_submit_urb(mtouch->irq, GFP_ATOMIC)) {
- mtouch->open--;
+ if (usb_submit_urb(mtouch->irq, GFP_ATOMIC))
return -EIO;
- }
return 0;
}
@@ -172,8 +166,7 @@ static void mtouchusb_close(struct input_dev *input)
{
struct mtouch_usb *mtouch = input->private;
- if (!--mtouch->open)
- usb_kill_urb(mtouch->irq);
+ usb_kill_urb(mtouch->irq);
}
static int mtouchusb_alloc_buffers(struct usb_device *udev, struct mtouch_usb *mtouch)