power: Cache SOC ID checks for future queries
Currently, get_soc_id() is queried on every SOC ID check in the
SDM660, MSM8916, MSM8952, MSM8953 and MSM8974-family HALs.
This results in extraneous file operations on every SOC ID check.
Cache the result of get_soc_id() during the first query to
reduce the number of file operations being made.
This also brings back the behaviour in LineageOS 15.1 when the
HALs were still stored in device/qcom/common.
Change-Id: Ic17dbf12e7f9ecdb47b73a580f467df9ad630aa0
3 files changed