From 65cde54b8b0299d7e46b8705338b01d1e44a5eb0 Mon Sep 17 00:00:00 2001 From: Dmitry Torokhov Date: Sun, 29 May 2005 02:29:38 -0500 Subject: 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 --- drivers/usb/input/mtouchusb.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'drivers/usb/input/mtouchusb.c') diff --git a/drivers/usb/input/mtouchusb.c b/drivers/usb/input/mtouchusb.c index ec1dd6278f7b..09b5cc7c66de 100644 --- a/drivers/usb/input/mtouchusb.c +++ b/drivers/usb/input/mtouchusb.c @@ -98,7 +98,6 @@ struct mtouch_usb { struct urb *irq; struct usb_device *udev; struct input_dev input; - int open; char name[128]; char phys[64]; }; @@ -155,15 +154,10 @@ static int mtouchusb_open(struct input_dev *input) { struct mtouch_usb *mtouch = input->private; - if (mtouch->open++) - return 0; - mtouch->irq->dev = mtouch->udev; - if (usb_submit_urb(mtouch->irq, GFP_ATOMIC)) { - mtouch->open--; + if (usb_submit_urb(mtouch->irq, GFP_ATOMIC)) return -EIO; - } return 0; } @@ -172,8 +166,7 @@ static void mtouchusb_close(struct input_dev *input) { struct mtouch_usb *mtouch = input->private; - if (!--mtouch->open) - usb_kill_urb(mtouch->irq); + usb_kill_urb(mtouch->irq); } static int mtouchusb_alloc_buffers(struct usb_device *udev, struct mtouch_usb *mtouch) -- cgit v1.2.3