aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Farina <tfarina@chromium.org>2014-01-26 18:57:12 -0500
committerMark Brown <broonie@linaro.org>2014-02-03 07:29:25 -0500
commitd55efa4d9bff20c98ca05e0bf458691e6869b5a1 (patch)
treedaf804222104f39c77cc2c4527e2087b46b27bdc
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
regulator: Make use of rdev_get_id() function where possible.
Signed-off-by: Thiago Farina <tfarina@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/regulator/pfuze100-regulator.c2
-rw-r--r--drivers/regulator/s2mps11.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index ab174f20ca11..b699d4e7acc5 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -92,7 +92,7 @@ MODULE_DEVICE_TABLE(of, pfuze_dt_ids);
92static int pfuze100_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay) 92static int pfuze100_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
93{ 93{
94 struct pfuze_chip *pfuze100 = rdev_get_drvdata(rdev); 94 struct pfuze_chip *pfuze100 = rdev_get_drvdata(rdev);
95 int id = rdev->desc->id; 95 int id = rdev_get_id(rdev);
96 unsigned int ramp_bits; 96 unsigned int ramp_bits;
97 int ret; 97 int ret;
98 98
diff --git a/drivers/regulator/s2mps11.c b/drivers/regulator/s2mps11.c
index d9e557990577..7e110b91be51 100644
--- a/drivers/regulator/s2mps11.c
+++ b/drivers/regulator/s2mps11.c
@@ -65,7 +65,7 @@ static int s2mps11_regulator_set_voltage_time_sel(struct regulator_dev *rdev,
65 unsigned int ramp_delay = 0; 65 unsigned int ramp_delay = 0;
66 int old_volt, new_volt; 66 int old_volt, new_volt;
67 67
68 switch (rdev->desc->id) { 68 switch (rdev_get_id(rdev)) {
69 case S2MPS11_BUCK2: 69 case S2MPS11_BUCK2:
70 ramp_delay = s2mps11->ramp_delay2; 70 ramp_delay = s2mps11->ramp_delay2;
71 break; 71 break;
@@ -105,7 +105,7 @@ static int s2mps11_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
105 unsigned int ramp_enable = 1, enable_shift = 0; 105 unsigned int ramp_enable = 1, enable_shift = 0;
106 int ret; 106 int ret;
107 107
108 switch (rdev->desc->id) { 108 switch (rdev_get_id(rdev)) {
109 case S2MPS11_BUCK1: 109 case S2MPS11_BUCK1:
110 if (ramp_delay > s2mps11->ramp_delay16) 110 if (ramp_delay > s2mps11->ramp_delay16)
111 s2mps11->ramp_delay16 = ramp_delay; 111 s2mps11->ramp_delay16 = ramp_delay;