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>
This commit is contained in:
Dmitry Torokhov
2005-05-29 02:29:38 -05:00
parent 3108d42de4
commit 65cde54b8b
10 changed files with 23 additions and 106 deletions

View File

@@ -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)