cpufreq: qcom-nvmem: Simplify driver data allocation
authorStephan Gerhold <stephan.gerhold@kernkonzept.com>
Wed, 18 Oct 2023 08:06:02 +0000 (10:06 +0200)
committerViresh Kumar <viresh.kumar@linaro.org>
Wed, 25 Oct 2023 09:19:35 +0000 (14:49 +0530)
commit2a5d46c3ad6b0e62d2b04356ad999d504fb564e0
tree855ccad49580a209abd602db9dacac2e60d38def
parentdce13a235a356363faf9385ba34681d9fc689f1a
cpufreq: qcom-nvmem: Simplify driver data allocation

Simplify the allocation and cleanup of driver data by using devm
together with a flexible array. Prepare for adding additional per-CPU
data by defining a struct qcom_cpufreq_drv_cpu instead of storing the
opp_tokens directly.

Signed-off-by: Stephan Gerhold <stephan.gerhold@kernkonzept.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
drivers/cpufreq/qcom-cpufreq-nvmem.c