]> www.infradead.org Git - users/willy/xarray.git/commit
regulator: max77650: Use container_of and constify static data
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Mon, 9 Sep 2024 13:51:28 +0000 (15:51 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 10 Sep 2024 11:44:18 +0000 (12:44 +0100)
commitc4d6a804713ac080841d1711a98ae1a6ecaede38
treec4c148149cb849ef9652a754c798ef1fd990e93c
parent7dd36b3287182bc889953f7741bdcef037109210
regulator: max77650: Use container_of and constify static data

Switch from rdev_get_drvdata() to container_of(), so the static
'struct max77650_regulator_desc' 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-17-8934704a5787@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/max77650-regulator.c