regulator: pf9453: 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-8-eeec378144d4@oss.qualcomm.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Krzysztof Kozlowski
2025-11-26 17:58:51 +01:00
committed by Mark Brown
parent 03c3bdebaa
commit 6341646f72

View File

@@ -550,7 +550,9 @@ static int buck_set_dvs(const struct regulator_desc *desc,
static int pf9453_set_dvs_levels(struct device_node *np, const struct regulator_desc *desc,
struct regulator_config *cfg)
{
struct pf9453_regulator_desc *data = container_of(desc, struct pf9453_regulator_desc, desc);
const struct pf9453_regulator_desc *data = container_of_const(desc,
struct pf9453_regulator_desc,
desc);
struct pf9453 *pf9453 = dev_get_drvdata(cfg->dev);
const struct pf9453_dvs_config *dvs = &data->dvs;
unsigned int reg, mask;