drivers: thermal: Avoid multiple TSENS controller re-init simultaneously
If TSENS controller went to bad state while reading temperature of
a sensor, TSENS invokes controller re-init code for all controller
and then notifies the thermal framework to re-evaluate thermal for
each sensor. There is a possibility that while executing TSENS
re-init code, another sensor temperature read request can be
initiated and it could lead to another TSENS controller re-init
code execution.
Use an atomic variable to check above mentioned path and avoid
multiple TSENS re-init at same time.
Change-Id: I3321e490f0276ba4b58a778177d234abb867699b
Signed-off-by:
Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
Loading
Please register or sign in to comment