drivers: thermal: Avoid race condition in updating the cooling device
Userspace when having a new request for cooling device, will use the
sysfs to vote. Since there can be a simultaneous request coming from
kernel governor, there is a potential race condition in updating the
update pending flag. This could leave a vote be ignored or delayed till
the next update.
Acquire mutex before updating the userspace request and the update
pending flag.
Change-Id: I41c86b92a21c42ecefe1127268958916c3bb5894
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
1 file changed