summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Jung <djung@nvidia.com>2013-11-13 13:48:45 -0800
committerHarry Hong <hhong@nvidia.com>2013-11-15 00:23:23 -0800
commit8f6d669fb06d81c0687fb0513ec322da8539e6f1 (patch)
tree97abe781de7c58d6f1e9f40a1bf53392284a60da
parent6bcd47a1fd59d2b3f83065c665f0440f1b52d02e (diff)
Revert "Revert "Revert "input: touch: maxim_sti: Check thread stop condition"""
This reverts commit 9ec2935d1e8b3a71a41bf383ca2e511aa24c7add. Bug 1404490 Change-Id: I305597f88979da9cd6eceeef0b33bec9bef200c3 Signed-off-by: David Jung <djung@nvidia.com> Reviewed-on: http://git-master/r/330676 Reviewed-by: Harry Hong <hhong@nvidia.com> Tested-by: Harry Hong <hhong@nvidia.com>
-rw-r--r--drivers/input/touchscreen/maxim_sti.c35
1 files changed, 6 insertions, 29 deletions
diff --git a/drivers/input/touchscreen/maxim_sti.c b/drivers/input/touchscreen/maxim_sti.c
index f1f4b3f076e0..c794053c4c67 100644
--- a/drivers/input/touchscreen/maxim_sti.c
+++ b/drivers/input/touchscreen/maxim_sti.c
@@ -28,10 +28,6 @@
#include <linux/maxim_sti.h>
#include <asm/byteorder.h> /* MUST include this header to get byte order */
-#ifdef CONFIG_PM_WAKELOCKS
-#include <linux/pm_wakeup.h>
-#endif
-
#define CREATE_TRACE_POINTS
#include <trace/events/touchscreen_maxim.h>
@@ -105,9 +101,6 @@ struct dev_data {
#if NV_ENABLE_CPU_BOOST
unsigned long last_irq_jiffies;
#endif
-#ifdef CONFIG_PM_WAKELOCKS
- struct wakeup_source ws;
-#endif
};
atomic_t touch_dvdd_on = ATOMIC_INIT(1);
@@ -792,9 +785,6 @@ static int suspend(struct device *dev)
return ret;
#endif
-#ifdef CONFIG_PM_WAKELOCKS
- __pm_relax(&dd->ws);
-#endif
INFO("suspend...done");
return 0;
@@ -811,10 +801,6 @@ static int resume(struct device *dev)
if (!dd->suspend_in_progress)
return 0;
-#ifdef CONFIG_PM_WAKELOCKS
- __pm_stay_awake(&dd->ws);
-#endif
-
#if SUSPEND_POWER_OFF
/* power-up and reset-high */
pdata->reset(pdata, 0);
@@ -1640,16 +1626,11 @@ static int processing_thread(void *arg)
complete(&dd->suspend_resume);
INFO("%s: suspended.", __func__);
-
- dd->expect_resume_ack = true;
- while (!dd->resume_in_progress &&
- !kthread_should_stop()) {
+ while (!dd->resume_in_progress) {
/* the line below is a MUST */
set_current_state(TASK_INTERRUPTIBLE);
schedule();
}
- if (kthread_should_stop())
- break;
INFO("%s: resuming.", __func__);
@@ -1694,13 +1675,11 @@ static int processing_thread(void *arg)
if (ret2 < 0)
ERROR("could not allocate outgoing " \
"skb (%d)", ret2);
- } while (ret != 0 && !kthread_should_stop());
- if (kthread_should_stop())
- break;
- if (ret == 0)
- INFO("%s: resumed.", __func__);
+ } while (ret != 0);
if (fusion_dead)
continue;
+ if (ret == 0)
+ INFO("%s: resumed.", __func__);
}
/* priority 4: service interrupt */
@@ -1846,10 +1825,6 @@ static int probe(struct spi_device *spi)
dd->last_irq_jiffies = jiffies;
#endif
-#ifdef CONFIG_PM_WAKELOCKS
- wakeup_source_init(&dd->ws, "touch_fusion");
- __pm_stay_awake(&dd->ws);
-#endif
/* start up Touch Fusion */
dd->start_fusion = true;
wake_up_process(dd->thread);
@@ -1889,6 +1864,8 @@ static int remove(struct spi_device *spi)
/* 4) above step (3) insures that all Netlink senders are */
/* definitely gone and it is safe to free up outgoing skb buffer */
/* and incoming skb queue */
+ dd->nl_enabled = false;
+ (void)kthread_stop(dd->thread);
genl_unregister_family(&dd->nl_family);
kfree_skb(dd->outgoing_skb);
skb_queue_purge(&dd->incoming_skb_queue);