summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBo Kim <bok@nvidia.com>2013-10-14 17:36:01 +0900
committerGabby Lee <galee@nvidia.com>2013-11-06 18:17:38 -0800
commitad5b947fe112517e3cfbe77f00f5cad66bd794cd (patch)
treecd5c362536b6183c7dbcd52ca196d7e69c00d98f
parentdb4316cda1b5d073da4572feb76524a155d44124 (diff)
Revert "input: touch: maxim_sti: Check thread stop condition"
This reverts commit 62c978972b14446f49433e08552cd14972369013. We don't need to check thread stop condition on latested maxim release. Conflicts: drivers/input/touchscreen/maxim_sti.c Change-Id: Ib6322cae36d82f510c4e1b45491f53ada1e6aebc Signed-off-by: Bo Kim <bok@nvidia.com> Reviewed-on: http://git-master/r/298915 GVS: Gerrit_Virtual_Submit Reviewed-by: Gabby Lee <galee@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 0adc131cc840..bab77b8e5f34 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>
@@ -104,9 +100,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(0);
@@ -791,9 +784,6 @@ static int suspend(struct device *dev)
return ret;
#endif
-#ifdef CONFIG_PM_WAKELOCKS
- __pm_relax(&dd->ws);
-#endif
INFO("suspend...done");
return 0;
@@ -810,10 +800,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);
@@ -1625,16 +1611,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__);
@@ -1679,13 +1660,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 */
@@ -1831,10 +1810,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 */
wake_up_process(dd->thread);
INFO("driver loaded; version %s; release date %s", DRIVER_VERSION,
@@ -1879,6 +1854,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);