aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/input/xpad.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/xpad.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/xpad.c')
-rw-r--r--drivers/usb/input/xpad.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/input/xpad.c b/drivers/usb/input/xpad.c
index a8076ccc0b2..a7fa1b17dcf 100644
--- a/drivers/usb/input/xpad.c
+++ b/drivers/usb/input/xpad.c
@@ -110,7 +110,6 @@ struct usb_xpad {
dma_addr_t idata_dma;
char phys[65]; /* physical device path */
- int open_count; /* reference count */
};
/*
@@ -197,14 +196,9 @@ static int xpad_open (struct input_dev *dev)
{
struct usb_xpad *xpad = dev->private;
- if (xpad->open_count++)
- return 0;
-
xpad->irq_in->dev = xpad->udev;
- if (usb_submit_urb(xpad->irq_in, GFP_KERNEL)) {
- xpad->open_count--;
+ if (usb_submit_urb(xpad->irq_in, GFP_KERNEL))
return -EIO;
- }
return 0;
}
@@ -213,8 +207,7 @@ static void xpad_close (struct input_dev *dev)
{
struct usb_xpad *xpad = dev->private;
- if (!--xpad->open_count)
- usb_kill_urb(xpad->irq_in);
+ usb_kill_urb(xpad->irq_in);
}
static int xpad_probe(struct usb_interface *intf, const struct usb_device_id *id)