diff options
author | Alex Gonzalez <alex.gonzalez@digi.com> | 2012-01-30 09:52:21 +0100 |
---|---|---|
committer | Alex Gonzalez <alex.gonzalez@digi.com> | 2012-01-31 10:08:55 +0100 |
commit | 2332540dc1a30ab3dda07563079188e6e1f3aebc (patch) | |
tree | 827e09342747dea24cd798ce0699be29452c9093 | |
parent | 7b953d0c53332aef1e5c3e69aef5fe86a5f39b58 (diff) |
ccxmx53: da9052 tsi, stop touch thread on reboot
It's safer if the touch thread stops accessing the PMIC early on reboot.
Signed-off-by: Alex Gonzalez <alex.gonzalez@digi.com>
-rw-r--r-- | drivers/input/touchscreen/da9052_tsi.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/input/touchscreen/da9052_tsi.c b/drivers/input/touchscreen/da9052_tsi.c index 2376eacf749b..fe165252c0d4 100644 --- a/drivers/input/touchscreen/da9052_tsi.c +++ b/drivers/input/touchscreen/da9052_tsi.c @@ -1104,6 +1104,17 @@ static ssize_t da9052_tsi_reg_proc_thread(void *ptr) while (priv->tsi_reg_proc_thread.state == ACTIVE) { + if ( signal_pending(current) ){ + siginfo_t info; + unsigned long signr; + + signr = dequeue_signal_lock(current, ¤t->blocked, &info); + if( signr == SIGKILL ){ + priv->tsi_reg_proc_thread.state = INACTIVE; + break; + } + } + try_to_freeze(); set_current_state(TASK_INTERRUPTIBLE); |