Skip to content

Commit

Permalink
regulator: bd718x7: Use rdev_get_id() to get regulator id
Browse files Browse the repository at this point in the history
Use rdev_get_id() instead of directly access rdev->desc->id.
While at it also remove unneeded init for ramp_value variable.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed Apr 8, 2019
1 parent 45a3101 commit 0a245f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/regulator/bd718x7-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
static int bd718xx_buck1234_set_ramp_delay(struct regulator_dev *rdev,
int ramp_delay)
{
int id = rdev->desc->id;
unsigned int ramp_value = BUCK_RAMPRATE_10P00MV;
int id = rdev_get_id(rdev);
unsigned int ramp_value;

dev_dbg(&rdev->dev, "Buck[%d] Set Ramp = %d\n", id + 1,
ramp_delay);
Expand Down

0 comments on commit 0a245f0

Please sign in to comment.