diff --git a/drivers/regulator/tps51632-regulator.c b/drivers/regulator/tps51632-regulator.c index dce5eb3fa706b40706a8d5988bb8e4857c5f8a47..7c4e8a6e1d5da1f6eb37c4fe8301099eadf46386 100644 --- a/drivers/regulator/tps51632-regulator.c +++ b/drivers/regulator/tps51632-regulator.c @@ -122,7 +122,7 @@ static int tps51632_dcdc_set_voltage_sel(struct regulator_dev *rdev, if (selector > TPS51632_MAX_VSEL) return -EINVAL; - ret = regmap_write(tps->regmap, TPS51632_VOLTAGE_SELECT_REG, selector); + ret = regmap_write(tps->regmap, reg, selector); if (ret < 0) dev_err(tps->dev, "reg write failed, err %d\n", ret); return ret;