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:
@@ -36,7 +36,6 @@ struct kbtab {
|
||||
struct input_dev dev;
|
||||
struct usb_device *usbdev;
|
||||
struct urb *irq;
|
||||
int open;
|
||||
int x, y;
|
||||
int button;
|
||||
int pressure;
|
||||
@@ -105,14 +104,9 @@ static int kbtab_open(struct input_dev *dev)
|
||||
{
|
||||
struct kbtab *kbtab = dev->private;
|
||||
|
||||
if (kbtab->open++)
|
||||
return 0;
|
||||
|
||||
kbtab->irq->dev = kbtab->usbdev;
|
||||
if (usb_submit_urb(kbtab->irq, GFP_KERNEL)) {
|
||||
kbtab->open--;
|
||||
if (usb_submit_urb(kbtab->irq, GFP_KERNEL))
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -121,8 +115,7 @@ static void kbtab_close(struct input_dev *dev)
|
||||
{
|
||||
struct kbtab *kbtab = dev->private;
|
||||
|
||||
if (!--kbtab->open)
|
||||
usb_kill_urb(kbtab->irq);
|
||||
usb_kill_urb(kbtab->irq);
|
||||
}
|
||||
|
||||
static int kbtab_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
||||
|
||||
Reference in New Issue
Block a user