diff options
| author | Ram Chandrasekar <rkumbako@codeaurora.org> | 2017-02-10 14:58:30 -0700 |
|---|---|---|
| committer | Ram Chandrasekar <rkumbako@codeaurora.org> | 2017-02-15 12:05:11 -0700 |
| commit | 4a86c2f3ccbb861cc50778cc4b67af153e99bf24 (patch) | |
| tree | 5a10e761dd5afdc275cd7d54ae30c5d6f1e83def /include | |
| parent | 487ff740cb8a0111016b0da2616aa8104cb0d440 (diff) | |
drivers: thermal: Exit sysfs notify kthread when sensor unregisters
When a thermal zone unregisters, it initiates a blocking call
kthread_stop for the sysfs notify kthread to exit. But the sysfs notify
kthread is blocked on a completion event, which may not be triggered after
the sensor driver initiates a thermal zone unregister call. So, the
kthread_stop will be blocked forever.
As a part of thermal zone unregister, set a thermal zone unregister flag
and send a completion event before calling kthread_stop. Make the sysfs
notify kthread to be aware of thermal zone unregister flag and exit
after the completion event is triggered.
Change-Id: Icf045e0ad6e28135cd3a54c15d9923f095a286ff
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/thermal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index b90f8f5c663d..4d2cf47aba27 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h @@ -178,6 +178,7 @@ struct sensor_info { struct work_struct work; struct task_struct *sysfs_notify_thread; struct completion sysfs_notify_complete; + bool deregister_active; }; /** |
