regulator: qcom_smd: Keep one rpm handle for all vregs
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Tue, 9 Jan 2024 10:04:49 +0000 (11:04 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 22 Jan 2024 00:06:46 +0000 (00:06 +0000)
commit5df3b41bd6b5432010d6d85e5aa7217bd8f6b0cb
tree925e16d05c84d7294d829318716b6e5bcf2a472a
parent6613476e225e090cc9aad49be7fa504e290dd33d
regulator: qcom_smd: Keep one rpm handle for all vregs

For no apparent reason (as there's just one RPM per SoC), all vregs
currently store a copy of a pointer to smd_rpm. Introduce a single,
global one to save up on space in each definition.

bloat-o-meter reports a slight uptick:

Total: Before=44008, After=44080, chg +0.16%

However the saved n * sizeof(ptr) for every dynamically allocated
regulator quickly makes up for it.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://msgid.link/r/20240109-rpm_vreg_cleanup-v3-1-fa0201029f78@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/qcom_smd-regulator.c