]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
regulator: hi6421v530: Use container_of and constify static data
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 9 Sep 2024 13:51:27 +0000 (15:51 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 10 Sep 2024 11:44:17 +0000 (12:44 +0100)
commit7dd36b3287182bc889953f7741bdcef037109210
tree9250037a8ab3b91e4b4562916d223e9d9cf37a71
parente9c7ff34c26d009c2f7c3d51236ed5a808dbc0d7
regulator: hi6421v530: Use container_of and constify static data

Switch from rdev_get_drvdata() to container_of(), so the static
'struct hi6421v530_regulator_info' holding 'struct regulator_desc' can
be made const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://patch.msgid.link/20240909-regulator-const-v1-16-8934704a5787@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/hi6421v530-regulator.c