From: Vasily Khoruzhick Date: Sun, 17 Nov 2019 18:47:36 +0000 (-0800) Subject: power: fan53555: fix fan53555_regulator_set_value X-Git-Tag: v2020.01-rc4~11^2~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e82692ab325088fe78beba727862c377ced0fc8b;p=oweals%2Fu-boot.git power: fan53555: fix fan53555_regulator_set_value fan53555_regulator_set_value() passes its own dev to pmic_clrsetbits() instead of its parent (pmic). As result u-boot crashes when you try to set voltage on fan53555 regulator Signed-off-by: Vasily Khoruzhick Reviewed-by: Kever Yang --- diff --git a/drivers/power/regulator/fan53555.c b/drivers/power/regulator/fan53555.c index 9c48b26216..24a9b67586 100644 --- a/drivers/power/regulator/fan53555.c +++ b/drivers/power/regulator/fan53555.c @@ -159,7 +159,7 @@ static int fan53555_regulator_set_value(struct udevice *dev, int uV) debug("%s: uV=%d; writing volume %d: %02x\n", __func__, uV, pdata->vol_reg, vol); - return pmic_clrsetbits(dev, pdata->vol_reg, GENMASK(6, 0), vol); + return pmic_clrsetbits(dev->parent, pdata->vol_reg, GENMASK(6, 0), vol); } static int fan53555_voltages_setup(struct udevice *dev)