cpufreq: qcom-hw: Allocate qcom_cpufreq_data during probe
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Wed, 2 Nov 2022 09:00:36 +0000 (14:30 +0530)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 2 Nov 2022 09:03:35 +0000 (14:33 +0530)
commit054a3ef683a176a509cc9b37f762029aae942495
tree239e8a5c5527b6929589c0056077a2d123ae8b54
parent68069b0d458bb06541641a294c15e06c5704ec2b
cpufreq: qcom-hw: Allocate qcom_cpufreq_data during probe

qcom_cpufreq_data is allocated based on the number of frequency domains
defined in DT which is static and won't change during runtime. There is
no real reason to allocate it during the CPU init() callback and deallocate
it during exit(). Hence, move the allocation to probe() and use the
allocated memory during init().

This also allows us to use devm_platform_get_and_ioremap_resource() helper
for acquiring the freq-domain resources from DT.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/qcom-cpufreq-hw.c