summaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/kbtab.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-05-29 02:29:38 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2005-05-29 02:29:38 -0500
commit65cde54b8b0299d7e46b8705338b01d1e44a5eb0 (patch)
tree2aa4c3ab303fd19440c636edaecdb0976f9d82c7 /drivers/usb/input/kbtab.c
parent3108d42de4da0823feb37a55db62acdc01554625 (diff)
downloadop-kernel-dev-65cde54b8b0299d7e46b8705338b01d1e44a5eb0.zip
op-kernel-dev-65cde54b8b0299d7e46b8705338b01d1e44a5eb0.tar.gz
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/kbtab.c')
-rw-r--r--drivers/usb/input/kbtab.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/input/kbtab.c b/drivers/usb/input/kbtab.c
index fff5753..d2f0f90 100644
--- a/drivers/usb/input/kbtab.c
+++ b/drivers/usb/input/kbtab.c
@@ -36,7 +36,6 @@ struct kbtab {
struct input_dev dev;
struct usb_device *usbdev;
struct urb *irq;
- int open;
int x, y;
int button;
int pressure;
@@ -105,14 +104,9 @@ static int kbtab_open(struct input_dev *dev)
{
struct kbtab *kbtab = dev->private;
- if (kbtab->open++)
- return 0;
-
kbtab->irq->dev = kbtab->usbdev;
- if (usb_submit_urb(kbtab->irq, GFP_KERNEL)) {
- kbtab->open--;
+ if (usb_submit_urb(kbtab->irq, GFP_KERNEL))
return -EIO;
- }
return 0;
}
@@ -121,8 +115,7 @@ static void kbtab_close(struct input_dev *dev)
{
struct kbtab *kbtab = dev->private;
- if (!--kbtab->open)
- usb_kill_urb(kbtab->irq);
+ usb_kill_urb(kbtab->irq);
}
static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *id)
OpenPOWER on IntegriCloud