drivers: thermal: bcl_soc: Skip thermal evaluation during zone register
During bcl soc thermal zone register, framework calls soc set trip
function and if it is already violated state, it schedules workqueue
to evaluate trip and notify the framework. But if this workqueue
get scheduled prior to thermal zone register complete, there is a
chance that workqueue will use uninitialized thermal zone pointer
to notify thermal framework for re-evaluation. It leads to
unexpected behaviour.
Check whether thermal zone variable is initialized or not. If it is
initialized, then only notify thermal framework for re-evaluation.
Post thermal zone registration, the bcl soc driver explicitly request
to re-evalute trip immediately. It ensures that if above condition
happens, after thermal zone register, it will notify framework.
Change-Id: I2797140847d8ddc462053c1a40f2404f55971c81
Signed-off-by:
Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Loading
Please register or sign in to comment