Skip to content

Commit

Permalink
regulator: s2mpa01: Use rdev_get_id() to access id of regulator
Browse files Browse the repository at this point in the history
Use regulator API rdev_get_id() to access id of regulator.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reviewed-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Krzysztof Kozlowski authored and Mark Brown committed May 17, 2014
1 parent 51e2fc0 commit 0608032
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/regulator/s2mpa01.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static int s2mpa01_regulator_set_voltage_time_sel(struct regulator_dev *rdev,
unsigned int ramp_delay = 0;
int old_volt, new_volt;

switch (rdev->desc->id) {
switch (rdev_get_id(rdev)) {
case S2MPA01_BUCK2:
case S2MPA01_BUCK4:
ramp_delay = s2mpa01->ramp_delay24;
Expand Down Expand Up @@ -102,7 +102,7 @@ static int s2mpa01_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
unsigned int ramp_enable = 1, enable_shift = 0;
int ret;

switch (rdev->desc->id) {
switch (rdev_get_id(rdev)) {
case S2MPA01_BUCK1:
enable_shift = S2MPA01_BUCK1_RAMP_EN_SHIFT;
if (!ramp_delay) {
Expand Down

0 comments on commit 0608032

Please sign in to comment.