Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: lp87565: Simplify lp87565_buck_set_ramp_delay

Use rdev->regmap/&rdev->dev instead of lp87565->regmap/lp87565->dev.
In additional, the lp87565->dev actually is the parent mfd device,
so the dev_err message is misleading here with lp87565->dev.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Link: https://lore.kernel.org/r/20190908035720.17748-1-axel.lin@ingics.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Axel Lin and committed by
Mark Brown
6cadd8ae c0b91344

+2 -3
+2 -3
drivers/regulator/lp87565-regulator.c
··· 65 65 int ramp_delay) 66 66 { 67 67 int id = rdev_get_id(rdev); 68 - struct lp87565 *lp87565 = rdev_get_drvdata(rdev); 69 68 unsigned int reg; 70 69 int ret; 71 70 ··· 85 86 else 86 87 reg = 0; 87 88 88 - ret = regmap_update_bits(lp87565->regmap, regulators[id].ctrl2_reg, 89 + ret = regmap_update_bits(rdev->regmap, regulators[id].ctrl2_reg, 89 90 LP87565_BUCK_CTRL_2_SLEW_RATE, 90 91 reg << __ffs(LP87565_BUCK_CTRL_2_SLEW_RATE)); 91 92 if (ret) { 92 - dev_err(lp87565->dev, "SLEW RATE write failed: %d\n", ret); 93 + dev_err(&rdev->dev, "SLEW RATE write failed: %d\n", ret); 93 94 return ret; 94 95 } 95 96