Skip to content
Unverified Commit 1ff35e66 authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by Mark Brown
Browse files

regulator: mt6358: Const-ify mt6358_regulator_info data structures



In the MT6358 regulator driver, each regulator is described by a
|struct regulator_desc| wrapped by a |struct mt6358_regulator_info|.
The latter was tied to the regulator device using the config's
driver_data field, which meant that the variables could not be constant.

Since each regulator device has a pointer to its regulator_desc, and
mt6358_regulator_info wraps that, the driver could use container_of()
to retrieve it instead.

Switch to using container_of(), drop tha driver_data setting, and
const-ify all the regulator descriptions.

Signed-off-by: default avatarChen-Yu Tsai <wenst@chromium.org>
Link: https://lore.kernel.org/r/20230609083009.2822259-6-wenst@chromium.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 04ba6652
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment