Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: tsc2005 - fix locking issue
Input: tsc2005 - use relative jiffies to schedule the watchdog
Input: tsc2005 - driver should depend on GENERIC_HARDIRQS

+14 -6
+1 -1
drivers/input/touchscreen/Kconfig
··· 641 642 config TOUCHSCREEN_TSC2005 643 tristate "TSC2005 based touchscreens" 644 - depends on SPI_MASTER 645 help 646 Say Y here if you have a TSC2005 based touchscreen. 647
··· 641 642 config TOUCHSCREEN_TSC2005 643 tristate "TSC2005 based touchscreens" 644 + depends on SPI_MASTER && GENERIC_HARDIRQS 645 help 646 Say Y here if you have a TSC2005 based touchscreen. 647
+13 -5
drivers/input/touchscreen/tsc2005.c
··· 358 if (ts->esd_timeout && ts->set_reset) { 359 ts->last_valid_interrupt = jiffies; 360 schedule_delayed_work(&ts->esd_work, 361 - round_jiffies(jiffies + 362 msecs_to_jiffies(ts->esd_timeout))); 363 } 364 ··· 477 int error; 478 u16 r; 479 480 - mutex_lock(&ts->mutex); 481 482 if (time_is_after_jiffies(ts->last_valid_interrupt + 483 msecs_to_jiffies(ts->esd_timeout))) ··· 517 tsc2005_start_scan(ts); 518 519 out: 520 /* re-arm the watchdog */ 521 schedule_delayed_work(&ts->esd_work, 522 - round_jiffies(jiffies + 523 msecs_to_jiffies(ts->esd_timeout))); 524 - mutex_unlock(&ts->mutex); 525 } 526 527 static int tsc2005_open(struct input_dev *input) ··· 671 goto err_remove_sysfs; 672 } 673 674 - set_irq_wake(spi->irq, 1); 675 return 0; 676 677 err_remove_sysfs:
··· 358 if (ts->esd_timeout && ts->set_reset) { 359 ts->last_valid_interrupt = jiffies; 360 schedule_delayed_work(&ts->esd_work, 361 + round_jiffies_relative( 362 msecs_to_jiffies(ts->esd_timeout))); 363 } 364 ··· 477 int error; 478 u16 r; 479 480 + if (!mutex_trylock(&ts->mutex)) { 481 + /* 482 + * If the mutex is taken, it means that disable or enable is in 483 + * progress. In that case just reschedule the work. If the work 484 + * is not needed, it will be canceled by disable. 485 + */ 486 + goto reschedule; 487 + } 488 489 if (time_is_after_jiffies(ts->last_valid_interrupt + 490 msecs_to_jiffies(ts->esd_timeout))) ··· 510 tsc2005_start_scan(ts); 511 512 out: 513 + mutex_unlock(&ts->mutex); 514 + reschedule: 515 /* re-arm the watchdog */ 516 schedule_delayed_work(&ts->esd_work, 517 + round_jiffies_relative( 518 msecs_to_jiffies(ts->esd_timeout))); 519 } 520 521 static int tsc2005_open(struct input_dev *input) ··· 663 goto err_remove_sysfs; 664 } 665 666 + irq_set_irq_wake(spi->irq, 1); 667 return 0; 668 669 err_remove_sysfs: