summary refs log tree commit diff
path: root/drivers/usb/input/xpad.c
diff options
context:
space:
mode:
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 a8076ccc0b2e..a7fa1b17dcfe 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)