Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 211360
b: refs/heads/master
c: f6cd378
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed Oct 5, 2010
1 parent c337845 commit 3f30458
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2520a426dc3033c00077e923a553fc6c98c7564
refs/heads/master: f6cd378372bff06093d72f978c0150eeed3ea201
23 changes: 12 additions & 11 deletions trunk/drivers/input/tablet/wacom_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,27 +103,26 @@ static void wacom_sys_irq(struct urb *urb)
static int wacom_open(struct input_dev *dev)
{
struct wacom *wacom = input_get_drvdata(dev);
int retval = 0;

mutex_lock(&wacom->lock);

wacom->irq->dev = wacom->usbdev;

if (usb_autopm_get_interface(wacom->intf) < 0) {
mutex_unlock(&wacom->lock);
if (usb_autopm_get_interface(wacom->intf) < 0)
return -EIO;
}

mutex_lock(&wacom->lock);

if (usb_submit_urb(wacom->irq, GFP_KERNEL)) {
usb_autopm_put_interface(wacom->intf);
mutex_unlock(&wacom->lock);
return -EIO;
retval = -EIO;
goto out;
}

wacom->open = true;
wacom->intf->needs_remote_wakeup = 1;

out:
mutex_unlock(&wacom->lock);
return 0;
if (retval)
usb_autopm_put_interface(wacom->intf);
return retval;
}

static void wacom_close(struct input_dev *dev)
Expand All @@ -135,6 +134,8 @@ static void wacom_close(struct input_dev *dev)
wacom->open = false;
wacom->intf->needs_remote_wakeup = 0;
mutex_unlock(&wacom->lock);

usb_autopm_put_interface(wacom->intf);
}

static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc,
Expand Down

0 comments on commit 3f30458

Please sign in to comment.