summaryrefslogtreecommitdiff
path: root/drivers/regulator/max77650-regulator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/max77650-regulator.c')
-rw-r--r--drivers/regulator/max77650-regulator.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/max77650-regulator.c b/drivers/regulator/max77650-regulator.c
index 7368f54f046d..a809264c77fc 100644
--- a/drivers/regulator/max77650-regulator.c
+++ b/drivers/regulator/max77650-regulator.c
@@ -68,7 +68,7 @@ static int max77650_regulator_is_enabled(struct regulator_dev *rdev)
struct regmap *map;
int val, rv, en;
- rdesc = container_of(rdev->desc, struct max77650_regulator_desc, desc);
+ rdesc = container_of_const(rdev->desc, struct max77650_regulator_desc, desc);
map = rdev_get_regmap(rdev);
rv = regmap_read(map, rdesc->regB, &val);
@@ -85,7 +85,7 @@ static int max77650_regulator_enable(struct regulator_dev *rdev)
const struct max77650_regulator_desc *rdesc;
struct regmap *map;
- rdesc = container_of(rdev->desc, struct max77650_regulator_desc, desc);
+ rdesc = container_of_const(rdev->desc, struct max77650_regulator_desc, desc);
map = rdev_get_regmap(rdev);
return regmap_update_bits(map, rdesc->regB,
@@ -98,7 +98,7 @@ static int max77650_regulator_disable(struct regulator_dev *rdev)
const struct max77650_regulator_desc *rdesc;
struct regmap *map;
- rdesc = container_of(rdev->desc, struct max77650_regulator_desc, desc);
+ rdesc = container_of_const(rdev->desc, struct max77650_regulator_desc, desc);
map = rdev_get_regmap(rdev);
return regmap_update_bits(map, rdesc->regB,