summaryrefslogtreecommitdiff
path: root/drivers/mxc/hdp-cec
diff options
context:
space:
mode:
authorJason Liu <jason.hui.liu@nxp.com>2018-10-25 10:32:08 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:34:46 +0800
commit30bde9fd375ff2452239959cf303d56f2034ace0 (patch)
tree7df65c9c7b2525b2e8f6cb34650b04ef21f5c9e9 /drivers/mxc/hdp-cec
parenta3cf776caca6b7ca0e9e20727df9a754d95b9ada (diff)
MLK-19989 drivers: mxc: hdp-cec: make the hdp-cec kernel thread freezeable
the hdp-cec kernel thread should be freezeable during system suspend phase, othwerwise, it will cause issues(hang) since it will still try to access some resources such as clocks which are off during system suspend process. Signed-off-by: Jason Liu <jason.hui.liu@nxp.com> Cc: Sandor Yu <sandor.yu@nxp.com> Cc: Laurentiu Palcu <laurentiu.palcu@nxp.com> Acked-by: Sandor Yu <sandor.yu@nxp.com> Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
Diffstat (limited to 'drivers/mxc/hdp-cec')
-rw-r--r--drivers/mxc/hdp-cec/imx-hdp-cec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mxc/hdp-cec/imx-hdp-cec.c b/drivers/mxc/hdp-cec/imx-hdp-cec.c
index e1aea1f13762..068ae8e82541 100644
--- a/drivers/mxc/hdp-cec/imx-hdp-cec.c
+++ b/drivers/mxc/hdp-cec/imx-hdp-cec.c
@@ -22,6 +22,7 @@
#include <linux/version.h>
#include <linux/workqueue.h>
#include <linux/kthread.h>
+#include <linux/freezer.h>
#include <media/cec.h>
#include <soc/imx8/soc.h>
@@ -173,8 +174,10 @@ static int cec_poll_worker(void *_cec)
int num_rx_msgs, i;
int sts;
+ set_freezable();
+
for (;;) {
- if (kthread_should_stop())
+ if (kthread_freezable_should_stop(NULL))
break;
/* Check TX State */