aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/input/aiptek.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dtor_core@ameritech.net>2005-05-29 03:29:38 -0400
committerDmitry Torokhov <dtor_core@ameritech.net>2005-05-29 03:29:38 -0400
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 68d9d281386c..a6921856a112 100644
--- a/drivers/usb/input/aiptek.c
+++ b/drivers/usb/input/aiptek.c
@@ -324,7 +324,6 @@ struct aiptek {
324 struct aiptek_settings curSetting; /* tablet's current programmable */ 324 struct aiptek_settings curSetting; /* tablet's current programmable */
325 struct aiptek_settings newSetting; /* ... and new param settings */ 325 struct aiptek_settings newSetting; /* ... and new param settings */
326 unsigned int ifnum; /* interface number for IO */ 326 unsigned int ifnum; /* interface number for IO */
327 int openCount; /* module use counter */
328 int diagnostic; /* tablet diagnostic codes */ 327 int diagnostic; /* tablet diagnostic codes */
329 unsigned long eventCount; /* event count */ 328 unsigned long eventCount; /* event count */
330 int inDelay; /* jitter: in jitter delay? */ 329 int inDelay; /* jitter: in jitter delay? */
@@ -814,15 +813,9 @@ static int aiptek_open(struct input_dev *inputdev)
814{ 813{
815 struct aiptek *aiptek = inputdev->private; 814 struct aiptek *aiptek = inputdev->private;
816 815
817 if (aiptek->openCount++ > 0) {
818 return 0;
819 }
820
821 aiptek->urb->dev = aiptek->usbdev; 816 aiptek->urb->dev = aiptek->usbdev;
822 if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0) { 817 if (usb_submit_urb(aiptek->urb, GFP_KERNEL) != 0)
823 aiptek->openCount--;
824 return -EIO; 818 return -EIO;
825 }
826 819
827 return 0; 820 return 0;
828} 821}
@@ -834,9 +827,7 @@ static void aiptek_close(struct input_dev *inputdev)
834{ 827{
835 struct aiptek *aiptek = inputdev->private; 828 struct aiptek *aiptek = inputdev->private;
836 829
837 if (--aiptek->openCount == 0) { 830 usb_kill_urb(aiptek->urb);
838 usb_kill_urb(aiptek->urb);
839 }
840} 831}
841 832
842/*********************************************************************** 833/***********************************************************************
@@ -2252,7 +2243,6 @@ static void aiptek_disconnect(struct usb_interface *intf)
2252 AIPTEK_PACKET_LENGTH, 2243 AIPTEK_PACKET_LENGTH,
2253 aiptek->data, aiptek->data_dma); 2244 aiptek->data, aiptek->data_dma);
2254 kfree(aiptek); 2245 kfree(aiptek);
2255 aiptek = NULL;
2256 } 2246 }
2257} 2247}
2258 2248