diff options
author | Robert Richter <robert.richter@amd.com> | 2010-10-25 10:58:34 -0400 |
---|---|---|
committer | Robert Richter <robert.richter@amd.com> | 2010-10-25 10:58:34 -0400 |
commit | 4cafc4b8d7219b70e15f22e4a51b3ce847810caf (patch) | |
tree | 8051ea3f36f0682d08f47df8e35e14ca7eb7a5d7 /drivers/input/tablet/wacom_sys.c | |
parent | b47fad3bfb5940cc3e28a1c69716f6dc44e4b7e6 (diff) | |
parent | dbd1e66e04558a582e673bc4a9cd933ce0228d93 (diff) |
Merge branch 'oprofile/core' into oprofile/x86
Conflicts:
arch/x86/oprofile/op_model_amd.c
Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'drivers/input/tablet/wacom_sys.c')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 42ba3691d908..b35876ee6908 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c | |||
@@ -103,27 +103,26 @@ static void wacom_sys_irq(struct urb *urb) | |||
103 | static int wacom_open(struct input_dev *dev) | 103 | static int wacom_open(struct input_dev *dev) |
104 | { | 104 | { |
105 | struct wacom *wacom = input_get_drvdata(dev); | 105 | struct wacom *wacom = input_get_drvdata(dev); |
106 | int retval = 0; | ||
106 | 107 | ||
107 | mutex_lock(&wacom->lock); | 108 | if (usb_autopm_get_interface(wacom->intf) < 0) |
108 | |||
109 | wacom->irq->dev = wacom->usbdev; | ||
110 | |||
111 | if (usb_autopm_get_interface(wacom->intf) < 0) { | ||
112 | mutex_unlock(&wacom->lock); | ||
113 | return -EIO; | 109 | return -EIO; |
114 | } | 110 | |
111 | mutex_lock(&wacom->lock); | ||
115 | 112 | ||
116 | if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { | 113 | if (usb_submit_urb(wacom->irq, GFP_KERNEL)) { |
117 | usb_autopm_put_interface(wacom->intf); | 114 | retval = -EIO; |
118 | mutex_unlock(&wacom->lock); | 115 | goto out; |
119 | return -EIO; | ||
120 | } | 116 | } |
121 | 117 | ||
122 | wacom->open = true; | 118 | wacom->open = true; |
123 | wacom->intf->needs_remote_wakeup = 1; | 119 | wacom->intf->needs_remote_wakeup = 1; |
124 | 120 | ||
121 | out: | ||
125 | mutex_unlock(&wacom->lock); | 122 | mutex_unlock(&wacom->lock); |
126 | return 0; | 123 | if (retval) |
124 | usb_autopm_put_interface(wacom->intf); | ||
125 | return retval; | ||
127 | } | 126 | } |
128 | 127 | ||
129 | static void wacom_close(struct input_dev *dev) | 128 | static void wacom_close(struct input_dev *dev) |
@@ -135,6 +134,8 @@ static void wacom_close(struct input_dev *dev) | |||
135 | wacom->open = false; | 134 | wacom->open = false; |
136 | wacom->intf->needs_remote_wakeup = 0; | 135 | wacom->intf->needs_remote_wakeup = 0; |
137 | mutex_unlock(&wacom->lock); | 136 | mutex_unlock(&wacom->lock); |
137 | |||
138 | usb_autopm_put_interface(wacom->intf); | ||
138 | } | 139 | } |
139 | 140 | ||
140 | static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc, | 141 | static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hid_desc, |