diff options
author | Ram Chandrasekar <rkumbako@codeaurora.org> | 2020-11-17 13:57:40 -0800 |
---|---|---|
committer | Ram Chandrasekar <rkumbako@codeaurora.org> | 2020-11-18 16:32:02 -0800 |
commit | dbc52fc76e6a41e75fa7ad49b5343e855ea8a821 (patch) | |
tree | b7f3b8b38801ba5c3fac1d31c15a5f5cd29c1677 /thermalConfig.cpp | |
parent | 7273761a6e729d63b8983adee08cac52c8adb3ba (diff) |
thermal-hal: Update the common data object with the status
thermal-hal has a hash map storing all the sensor instances. Use the same
instance to read and update the temperature, update the severity and
determine the next threshold based on severity. Not using the same
instance can lead to a situation where the information is updated in the
local copy rather than in the global copy in the hash map.
Also change the return signature of the estimateseverity function to
return the new severity value if it is changed. Otherwise it will return
-1. This provided a mechanism for the caller's to know if there is any
change in severity for that sensor.
Change-Id: I34c2a271b505fea969db6f4a04321e63c0181ea7
Diffstat (limited to 'thermalConfig.cpp')
-rw-r--r-- | thermalConfig.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/thermalConfig.cpp b/thermalConfig.cpp index 52d6944..158d5c2 100644 --- a/thermalConfig.cpp +++ b/thermalConfig.cpp @@ -564,7 +564,7 @@ namespace implementation { bool bcl_defined = false; std::string soc_val; - if (cmnInst.readFromFile(socIDPath, &soc_val) <= 0) { + if (cmnInst.readFromFile(socIDPath, soc_val) <= 0) { LOG(ERROR) <<"soc ID fetch error"; return; } |