summaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/aiptek.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/aiptek.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/aiptek.c')
-rw-r--r--drivers/usb/input/aiptek.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c
index 68d9d281386..a6921856a11 100644
--- a/drivers/usb/input/aiptek.c
+++ b/drivers/usb/input/aiptek.c
@@ -324,7 +324,6 @@ struct aiptek {
struct aiptek_settings curSetting; /* tablet's current programmable */
struct aiptek_settings newSetting; /* ... and new param settings */
unsigned int ifnum; /* interface number for IO */
- int openCount; /* module use counter */
int diagnostic; /* tablet diagnostic codes */
unsigned long eventCount; /* event count */
int inDelay; /* jitter: in jitter delay? */
@@ -814,15 +813,9 @@ static int aiptek_open(struct input_dev *inputdev)
{
struct aiptek *aiptek = inputdev->private;
- if (aiptek->openCount++ > 0) {
- return 0;
- }
-
aiptek->urb->dev = aiptek->usbdev;
- if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0) {
- aiptek->openCount--;
+ if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0)
return -EIO;
- }
return 0;
}
@@ -834,9 +827,7 @@ static void aiptek_close(struct input_dev *inputdev)
{
struct aiptek *aiptek = inputdev->private;
- if (--aiptek->openCount == 0) {
- usb_kill_urb(aiptek->urb);
- }
+ usb_kill_urb(aiptek->urb);
}
/***********************************************************************
@@ -2252,7 +2243,6 @@ static void aiptek_disconnect(struct usb_interface *intf)
AIPTEK_PACKET_LENGTH,
aiptek->data, aiptek->data_dma);
kfree(aiptek);
- aiptek = NULL;
}
}