diff options
| author | Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> | 2025-11-26 19:58:47 +0300 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2025-11-26 21:44:29 +0300 |
| commit | 7a7e1ed307de6cc68639f602f3fa247ec0903354 (patch) | |
| tree | 9c224ac14e9938e401cbe6797de3ba57b3e63506 | |
| parent | d02ea816cccae6c02c7c026b5a74bf99a784c9c8 (diff) | |
| download | linux-7a7e1ed307de6cc68639f602f3fa247ec0903354.tar.xz | |
regulator: bd718x7: Constify pointers to 'regulator_desc' wrap struct
Pointer to 'struct regulator_desc' is a pointer to const and the
wrapping structure (container) is not being modified, thus entire syntax
can be replaced to preferred and safer container_of_const().
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251126-container-of-const-regulator-v1-4-eeec378144d4@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
| -rw-r--r-- | drivers/regulator/bd718x7-regulator.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/bd718x7-regulator.c b/drivers/regulator/bd718x7-regulator.c index 022d98f3c32a..426f68443e26 100644 --- a/drivers/regulator/bd718x7-regulator.c +++ b/drivers/regulator/bd718x7-regulator.c @@ -698,9 +698,9 @@ static int buck_set_hw_dvs_levels(struct device_node *np, const struct regulator_desc *desc, struct regulator_config *cfg) { - struct bd718xx_regulator_data *data; + const struct bd718xx_regulator_data *data; - data = container_of(desc, struct bd718xx_regulator_data, desc); + data = container_of_const(desc, struct bd718xx_regulator_data, desc); return rohm_regulator_set_dvs_levels(&data->dvs, np, desc, cfg->regmap); } |
