aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-07-06 12:50:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-07-06 12:50:39 -0400
commit1b74a8684e3c5cbbe5e798de9e07e3a087c7b853 (patch)
treeb8c66506e1f4d18113796e94d4ab5d30b6f07b2c
parentc4aed353b1b079eb4843e6a708fc68b4b28f72aa (diff)
parent9b7e31bbf4bb58b12e11a7f24b7c3e48bbd2f4da (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
Pull input layer fixes from Dmitry Torokhov: "Two fixes for regressions in Wacom driver and fixes for drivers using threaded IRQ framework without specifying IRQF_ONESHOT." * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: request threaded-only IRQs with IRQF_ONESHOT Input: wacom - don't retrieve touch_max when it is predefined Input: wacom - fix retrieving touch_max bug Input: fix input.h kernel-doc warning
-rw-r--r--drivers/input/joystick/as5011.c5
-rw-r--r--drivers/input/keyboard/mcs_touchkey.c3
-rw-r--r--drivers/input/keyboard/mpr121_touchkey.c2
-rw-r--r--drivers/input/keyboard/qt1070.c3
-rw-r--r--drivers/input/keyboard/tca6416-keypad.c3
-rw-r--r--drivers/input/keyboard/tca8418_keypad.c2
-rw-r--r--drivers/input/keyboard/tnetv107x-keypad.c8
-rw-r--r--drivers/input/misc/ad714x.c8
-rw-r--r--drivers/input/misc/dm355evm_keys.c3
-rw-r--r--drivers/input/tablet/wacom_sys.c6
-rw-r--r--drivers/input/touchscreen/ad7879.c2
-rw-r--r--drivers/input/touchscreen/atmel_mxt_ts.c3
-rw-r--r--drivers/input/touchscreen/bu21013_ts.c3
-rw-r--r--drivers/input/touchscreen/cy8ctmg110_ts.c3
-rw-r--r--drivers/input/touchscreen/intel-mid-touch.c2
-rw-r--r--drivers/input/touchscreen/pixcir_i2c_ts.c2
-rw-r--r--drivers/input/touchscreen/tnetv107x-ts.c2
-rw-r--r--drivers/input/touchscreen/tsc2005.c3
-rw-r--r--include/linux/input.h1
19 files changed, 39 insertions, 25 deletions
diff --git a/drivers/input/joystick/as5011.c b/drivers/input/joystick/as5011.c
index 57d19d4e0a2..c96653b5886 100644
--- a/drivers/input/joystick/as5011.c
+++ b/drivers/input/joystick/as5011.c
@@ -282,7 +282,8 @@ static int __devinit as5011_probe(struct i2c_client *client,
282 282
283 error = request_threaded_irq(as5011->button_irq, 283 error = request_threaded_irq(as5011->button_irq,
284 NULL, as5011_button_interrupt, 284 NULL, as5011_button_interrupt,
285 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, 285 IRQF_TRIGGER_RISING |
286 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
286 "as5011_button", as5011); 287 "as5011_button", as5011);
287 if (error < 0) { 288 if (error < 0) {
288 dev_err(&client->dev, 289 dev_err(&client->dev,
@@ -296,7 +297,7 @@ static int __devinit as5011_probe(struct i2c_client *client,
296 297
297 error = request_threaded_irq(as5011->axis_irq, NULL, 298 error = request_threaded_irq(as5011->axis_irq, NULL,
298 as5011_axis_interrupt, 299 as5011_axis_interrupt,
299 plat_data->axis_irqflags, 300 plat_data->axis_irqflags | IRQF_ONESHOT,
300 "as5011_joystick", as5011); 301 "as5011_joystick", as5011);
301 if (error) { 302 if (error) {
302 dev_err(&client->dev, 303 dev_err(&client->dev,
diff --git a/drivers/input/keyboard/mcs_touchkey.c b/drivers/input/keyboard/mcs_touchkey.c
index 64a0ca4c92f..0d77f6c8495 100644
--- a/drivers/input/keyboard/mcs_touchkey.c
+++ b/drivers/input/keyboard/mcs_touchkey.c
@@ -178,7 +178,8 @@ static int __devinit mcs_touchkey_probe(struct i2c_client *client,
178 } 178 }
179 179
180 error = request_threaded_irq(client->irq, NULL, mcs_touchkey_interrupt, 180 error = request_threaded_irq(client->irq, NULL, mcs_touchkey_interrupt,
181 IRQF_TRIGGER_FALLING, client->dev.driver->name, data); 181 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
182 client->dev.driver->name, data);
182 if (error) { 183 if (error) {
183 dev_err(&client->dev, "Failed to register interrupt\n"); 184 dev_err(&client->dev, "Failed to register interrupt\n");
184 goto err_free_mem; 185 goto err_free_mem;
diff --git a/drivers/input/keyboard/mpr121_touchkey.c b/drivers/input/keyboard/mpr121_touchkey.c
index caa218a51b5..7613f1cac95 100644
--- a/drivers/input/keyboard/mpr121_touchkey.c
+++ b/drivers/input/keyboard/mpr121_touchkey.c
@@ -248,7 +248,7 @@ static int __devinit mpr_touchkey_probe(struct i2c_client *client,
248 248
249 error = request_threaded_irq(client->irq, NULL, 249 error = request_threaded_irq(client->irq, NULL,
250 mpr_touchkey_interrupt, 250 mpr_touchkey_interrupt,
251 IRQF_TRIGGER_FALLING, 251 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
252 client->dev.driver->name, mpr121); 252 client->dev.driver->name, mpr121);
253 if (error) { 253 if (error) {
254 dev_err(&client->dev, "Failed to register interrupt\n"); 254 dev_err(&client->dev, "Failed to register interrupt\n");
diff --git a/drivers/input/keyboard/qt1070.c b/drivers/input/keyboard/qt1070.c
index 0b7b2f89175..ca68f2992d7 100644
--- a/drivers/input/keyboard/qt1070.c
+++ b/drivers/input/keyboard/qt1070.c
@@ -201,7 +201,8 @@ static int __devinit qt1070_probe(struct i2c_client *client,
201 msleep(QT1070_RESET_TIME); 201 msleep(QT1070_RESET_TIME);
202 202
203 err = request_threaded_irq(client->irq, NULL, qt1070_interrupt, 203 err = request_threaded_irq(client->irq, NULL, qt1070_interrupt,
204 IRQF_TRIGGER_NONE, client->dev.driver->name, data); 204 IRQF_TRIGGER_NONE | IRQF_ONESHOT,
205 client->dev.driver->name, data);
205 if (err) { 206 if (err) {
206 dev_err(&client->dev, "fail to request irq\n"); 207 dev_err(&client->dev, "fail to request irq\n");
207 goto err_free_mem; 208 goto err_free_mem;
diff --git a/drivers/input/keyboard/tca6416-keypad.c b/drivers/input/keyboard/tca6416-keypad.c
index 3afea3f8971..c355cdde8d2 100644
--- a/drivers/input/keyboard/tca6416-keypad.c
+++ b/drivers/input/keyboard/tca6416-keypad.c
@@ -278,7 +278,8 @@ static int __devinit tca6416_keypad_probe(struct i2c_client *client,
278 278
279 error = request_threaded_irq(chip->irqnum, NULL, 279 error = request_threaded_irq(chip->irqnum, NULL,
280 tca6416_keys_isr, 280 tca6416_keys_isr,
281 IRQF_TRIGGER_FALLING, 281 IRQF_TRIGGER_FALLING |
282 IRQF_ONESHOT,
282 "tca6416-keypad", chip); 283 "tca6416-keypad", chip);
283 if (error) { 284 if (error) {
284 dev_dbg(&client->dev, 285 dev_dbg(&client->dev,
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c
index 5f87b28b319..893869b29ed 100644
--- a/drivers/input/keyboard/tca8418_keypad.c
+++ b/drivers/input/keyboard/tca8418_keypad.c
@@ -360,7 +360,7 @@ static int __devinit tca8418_keypad_probe(struct i2c_client *client,
360 client->irq = gpio_to_irq(client->irq); 360 client->irq = gpio_to_irq(client->irq);
361 361
362 error = request_threaded_irq(client->irq, NULL, tca8418_irq_handler, 362 error = request_threaded_irq(client->irq, NULL, tca8418_irq_handler,
363 IRQF_TRIGGER_FALLING, 363 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
364 client->name, keypad_data); 364 client->name, keypad_data);
365 if (error) { 365 if (error) {
366 dev_dbg(&client->dev, 366 dev_dbg(&client->dev,
diff --git a/drivers/input/keyboard/tnetv107x-keypad.c b/drivers/input/keyboard/tnetv107x-keypad.c
index a4a445fb702..4c34f21fbe2 100644
--- a/drivers/input/keyboard/tnetv107x-keypad.c
+++ b/drivers/input/keyboard/tnetv107x-keypad.c
@@ -227,15 +227,15 @@ static int __devinit keypad_probe(struct platform_device *pdev)
227 goto error_clk; 227 goto error_clk;
228 } 228 }
229 229
230 error = request_threaded_irq(kp->irq_press, NULL, keypad_irq, 0, 230 error = request_threaded_irq(kp->irq_press, NULL, keypad_irq,
231 dev_name(dev), kp); 231 IRQF_ONESHOT, dev_name(dev), kp);
232 if (error < 0) { 232 if (error < 0) {
233 dev_err(kp->dev, "Could not allocate keypad press key irq\n"); 233 dev_err(kp->dev, "Could not allocate keypad press key irq\n");
234 goto error_irq_press; 234 goto error_irq_press;
235 } 235 }
236 236
237 error = request_threaded_irq(kp->irq_release, NULL, keypad_irq, 0, 237 error = request_threaded_irq(kp->irq_release, NULL, keypad_irq,
238 dev_name(dev), kp); 238 IRQF_ONESHOT, dev_name(dev), kp);
239 if (error < 0) { 239 if (error < 0) {
240 dev_err(kp->dev, "Could not allocate keypad release key irq\n"); 240 dev_err(kp->dev, "Could not allocate keypad release key irq\n");
241 goto error_irq_release; 241 goto error_irq_release;
diff --git a/drivers/input/misc/ad714x.c b/drivers/input/misc/ad714x.c
index 0ac75bbad4d..2e5d5e1de64 100644
--- a/drivers/input/misc/ad714x.c
+++ b/drivers/input/misc/ad714x.c
@@ -972,6 +972,7 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
972 struct ad714x_platform_data *plat_data = dev->platform_data; 972 struct ad714x_platform_data *plat_data = dev->platform_data;
973 struct ad714x_chip *ad714x; 973 struct ad714x_chip *ad714x;
974 void *drv_mem; 974 void *drv_mem;
975 unsigned long irqflags;
975 976
976 struct ad714x_button_drv *bt_drv; 977 struct ad714x_button_drv *bt_drv;
977 struct ad714x_slider_drv *sd_drv; 978 struct ad714x_slider_drv *sd_drv;
@@ -1162,10 +1163,11 @@ struct ad714x_chip *ad714x_probe(struct device *dev, u16 bus_type, int irq,
1162 alloc_idx++; 1163 alloc_idx++;
1163 } 1164 }
1164 1165
1166 irqflags = plat_data->irqflags ?: IRQF_TRIGGER_FALLING;
1167 irqflags |= IRQF_ONESHOT;
1168
1165 error = request_threaded_irq(ad714x->irq, NULL, ad714x_interrupt_thread, 1169 error = request_threaded_irq(ad714x->irq, NULL, ad714x_interrupt_thread,
1166 plat_data->irqflags ? 1170 irqflags, "ad714x_captouch", ad714x);
1167 plat_data->irqflags : IRQF_TRIGGER_FALLING,
1168 "ad714x_captouch", ad714x);
1169 if (error) { 1171 if (error) {
1170 dev_err(dev, "can't allocate irq %d\n", ad714x->irq); 1172 dev_err(dev, "can't allocate irq %d\n", ad714x->irq);
1171 goto err_unreg_dev; 1173 goto err_unreg_dev;
diff --git a/drivers/input/misc/dm355evm_keys.c b/drivers/input/misc/dm355evm_keys.c
index 35083c6836c..c1313d8535c 100644
--- a/drivers/input/misc/dm355evm_keys.c
+++ b/drivers/input/misc/dm355evm_keys.c
@@ -213,7 +213,8 @@ static int __devinit dm355evm_keys_probe(struct platform_device *pdev)
213 /* REVISIT: flush the event queue? */ 213 /* REVISIT: flush the event queue? */
214 214
215 status = request_threaded_irq(keys->irq, NULL, dm355evm_keys_irq, 215 status = request_threaded_irq(keys->irq, NULL, dm355evm_keys_irq,
216 IRQF_TRIGGER_FALLING, dev_name(&pdev->dev), keys); 216 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
217 dev_name(&pdev->dev), keys);
217 if (status < 0) 218 if (status < 0)
218 goto fail2; 219 goto fail2;
219 220
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index cad5602d3ce..8b31473a81f 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -216,7 +216,7 @@ static void wacom_retrieve_report_data(struct usb_interface *intf,
216 216
217 rep_data[0] = 12; 217 rep_data[0] = 12;
218 result = wacom_get_report(intf, WAC_HID_FEATURE_REPORT, 218 result = wacom_get_report(intf, WAC_HID_FEATURE_REPORT,
219 rep_data[0], &rep_data, 2, 219 rep_data[0], rep_data, 2,
220 WAC_MSG_RETRIES); 220 WAC_MSG_RETRIES);
221 221
222 if (result >= 0 && rep_data[1] > 2) 222 if (result >= 0 && rep_data[1] > 2)
@@ -401,7 +401,9 @@ static int wacom_parse_hid(struct usb_interface *intf,
401 break; 401 break;
402 402
403 case HID_USAGE_CONTACTMAX: 403 case HID_USAGE_CONTACTMAX:
404 wacom_retrieve_report_data(intf, features); 404 /* leave touch_max as is if predefined */
405 if (!features->touch_max)
406 wacom_retrieve_report_data(intf, features);
405 i++; 407 i++;
406 break; 408 break;
407 } 409 }
diff --git a/drivers/input/touchscreen/ad7879.c b/drivers/input/touchscreen/ad7879.c
index e2482b40da5..bd4eb427769 100644
--- a/drivers/input/touchscreen/ad7879.c
+++ b/drivers/input/touchscreen/ad7879.c
@@ -597,7 +597,7 @@ struct ad7879 *ad7879_probe(struct device *dev, u8 devid, unsigned int irq,
597 AD7879_TMR(ts->pen_down_acc_interval); 597 AD7879_TMR(ts->pen_down_acc_interval);
598 598
599 err = request_threaded_irq(ts->irq, NULL, ad7879_irq, 599 err = request_threaded_irq(ts->irq, NULL, ad7879_irq,
600 IRQF_TRIGGER_FALLING, 600 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
601 dev_name(dev), ts); 601 dev_name(dev), ts);
602 if (err) { 602 if (err) {
603 dev_err(dev, "irq %d busy?\n", ts->irq); 603 dev_err(dev, "irq %d busy?\n", ts->irq);
diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
index 42e645062c2..25fd0561a17 100644
--- a/drivers/input/touchscreen/atmel_mxt_ts.c
+++ b/drivers/input/touchscreen/atmel_mxt_ts.c
@@ -1149,7 +1149,8 @@ static int __devinit mxt_probe(struct i2c_client *client,
1149 goto err_free_object; 1149 goto err_free_object;
1150 1150
1151 error = request_threaded_irq(client->irq, NULL, mxt_interrupt, 1151 error = request_threaded_irq(client->irq, NULL, mxt_interrupt,
1152 pdata->irqflags, client->dev.driver->name, data); 1152 pdata->irqflags | IRQF_ONESHOT,
1153 client->dev.driver->name, data);
1153 if (error) { 1154 if (error) {
1154 dev_err(&client->dev, "Failed to register interrupt\n"); 1155 dev_err(&client->dev, "Failed to register interrupt\n");
1155 goto err_free_object; 1156 goto err_free_object;
diff --git a/drivers/input/touchscreen/bu21013_ts.c b/drivers/input/touchscreen/bu21013_ts.c
index f2d03c06c2d..5c487d23f11 100644
--- a/drivers/input/touchscreen/bu21013_ts.c
+++ b/drivers/input/touchscreen/bu21013_ts.c
@@ -509,7 +509,8 @@ static int __devinit bu21013_probe(struct i2c_client *client,
509 input_set_drvdata(in_dev, bu21013_data); 509 input_set_drvdata(in_dev, bu21013_data);
510 510
511 error = request_threaded_irq(pdata->irq, NULL, bu21013_gpio_irq, 511 error = request_threaded_irq(pdata->irq, NULL, bu21013_gpio_irq,
512 IRQF_TRIGGER_FALLING | IRQF_SHARED, 512 IRQF_TRIGGER_FALLING | IRQF_SHARED |
513 IRQF_ONESHOT,
513 DRIVER_TP, bu21013_data); 514 DRIVER_TP, bu21013_data);
514 if (error) { 515 if (error) {
515 dev_err(&client->dev, "request irq %d failed\n", pdata->irq); 516 dev_err(&client->dev, "request irq %d failed\n", pdata->irq);
diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c
index 237753ad103..464f1bf4b61 100644
--- a/drivers/input/touchscreen/cy8ctmg110_ts.c
+++ b/drivers/input/touchscreen/cy8ctmg110_ts.c
@@ -251,7 +251,8 @@ static int __devinit cy8ctmg110_probe(struct i2c_client *client,
251 } 251 }
252 252
253 err = request_threaded_irq(client->irq, NULL, cy8ctmg110_irq_thread, 253 err = request_threaded_irq(client->irq, NULL, cy8ctmg110_irq_thread,
254 IRQF_TRIGGER_RISING, "touch_reset_key", ts); 254 IRQF_TRIGGER_RISING | IRQF_ONESHOT,
255 "touch_reset_key", ts);
255 if (err < 0) { 256 if (err < 0) {
256 dev_err(&client->dev, 257 dev_err(&client->dev,
257 "irq %d busy? error %d\n", client->irq, err); 258 "irq %d busy? error %d\n", client->irq, err);
diff --git a/drivers/input/touchscreen/intel-mid-touch.c b/drivers/input/touchscreen/intel-mid-touch.c
index 3cd7a837f82..cf299377fc4 100644
--- a/drivers/input/touchscreen/intel-mid-touch.c
+++ b/drivers/input/touchscreen/intel-mid-touch.c
@@ -620,7 +620,7 @@ static int __devinit mrstouch_probe(struct platform_device *pdev)
620 MRST_PRESSURE_MIN, MRST_PRESSURE_MAX, 0, 0); 620 MRST_PRESSURE_MIN, MRST_PRESSURE_MAX, 0, 0);
621 621
622 err = request_threaded_irq(tsdev->irq, NULL, mrstouch_pendet_irq, 622 err = request_threaded_irq(tsdev->irq, NULL, mrstouch_pendet_irq,
623 0, "mrstouch", tsdev); 623 IRQF_ONESHOT, "mrstouch", tsdev);
624 if (err) { 624 if (err) {
625 dev_err(tsdev->dev, "unable to allocate irq\n"); 625 dev_err(tsdev->dev, "unable to allocate irq\n");
626 goto err_free_mem; 626 goto err_free_mem;
diff --git a/drivers/input/touchscreen/pixcir_i2c_ts.c b/drivers/input/touchscreen/pixcir_i2c_ts.c
index 72f6ba3a470..953b4c105ca 100644
--- a/drivers/input/touchscreen/pixcir_i2c_ts.c
+++ b/drivers/input/touchscreen/pixcir_i2c_ts.c
@@ -165,7 +165,7 @@ static int __devinit pixcir_i2c_ts_probe(struct i2c_client *client,
165 input_set_drvdata(input, tsdata); 165 input_set_drvdata(input, tsdata);
166 166
167 error = request_threaded_irq(client->irq, NULL, pixcir_ts_isr, 167 error = request_threaded_irq(client->irq, NULL, pixcir_ts_isr,
168 IRQF_TRIGGER_FALLING, 168 IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
169 client->name, tsdata); 169 client->name, tsdata);
170 if (error) { 170 if (error) {
171 dev_err(&client->dev, "Unable to request touchscreen IRQ.\n"); 171 dev_err(&client->dev, "Unable to request touchscreen IRQ.\n");
diff --git a/drivers/input/touchscreen/tnetv107x-ts.c b/drivers/input/touchscreen/tnetv107x-ts.c
index 7e748809735..368d2c6cf78 100644
--- a/drivers/input/touchscreen/tnetv107x-ts.c
+++ b/drivers/input/touchscreen/tnetv107x-ts.c
@@ -297,7 +297,7 @@ static int __devinit tsc_probe(struct platform_device *pdev)
297 goto error_clk; 297 goto error_clk;
298 } 298 }
299 299
300 error = request_threaded_irq(ts->tsc_irq, NULL, tsc_irq, 0, 300 error = request_threaded_irq(ts->tsc_irq, NULL, tsc_irq, IRQF_ONESHOT,
301 dev_name(dev), ts); 301 dev_name(dev), ts);
302 if (error < 0) { 302 if (error < 0) {
303 dev_err(ts->dev, "Could not allocate ts irq\n"); 303 dev_err(ts->dev, "Could not allocate ts irq\n");
diff --git a/drivers/input/touchscreen/tsc2005.c b/drivers/input/touchscreen/tsc2005.c
index b6adeaee9cc..5ce3fa8ce64 100644
--- a/drivers/input/touchscreen/tsc2005.c
+++ b/drivers/input/touchscreen/tsc2005.c
@@ -650,7 +650,8 @@ static int __devinit tsc2005_probe(struct spi_device *spi)
650 tsc2005_stop_scan(ts); 650 tsc2005_stop_scan(ts);
651 651
652 error = request_threaded_irq(spi->irq, NULL, tsc2005_irq_thread, 652 error = request_threaded_irq(spi->irq, NULL, tsc2005_irq_thread,
653 IRQF_TRIGGER_RISING, "tsc2005", ts); 653 IRQF_TRIGGER_RISING | IRQF_ONESHOT,
654 "tsc2005", ts);
654 if (error) { 655 if (error) {
655 dev_err(&spi->dev, "Failed to request irq, err: %d\n", error); 656 dev_err(&spi->dev, "Failed to request irq, err: %d\n", error);
656 goto err_free_mem; 657 goto err_free_mem;
diff --git a/include/linux/input.h b/include/linux/input.h
index a8167145357..2740d080ec6 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -116,6 +116,7 @@ struct input_keymap_entry {
116 116
117/** 117/**
118 * EVIOCGMTSLOTS(len) - get MT slot values 118 * EVIOCGMTSLOTS(len) - get MT slot values
119 * @len: size of the data buffer in bytes
119 * 120 *
120 * The ioctl buffer argument should be binary equivalent to 121 * The ioctl buffer argument should be binary equivalent to
121 * 122 *