]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
regulator: Make use of rdev_get_id() function where possible.
authorThiago Farina <tfarina@chromium.org>
Sun, 26 Jan 2014 23:57:12 +0000 (21:57 -0200)
committerNitin Garg <nitin.garg@freescale.com>
Fri, 16 Jan 2015 03:17:15 +0000 (21:17 -0600)
Signed-off-by: Thiago Farina <tfarina@chromium.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
(cherry picked from commit d55efa4d9bff20c98ca05e0bf458691e6869b5a1)

drivers/regulator/pfuze100-regulator.c
drivers/regulator/s2mps11.c

index ab174f20ca11f473c889848b1d7e6b7545a9e3ef..b699d4e7acc5b125e0b42eee2858c7ff1b225271 100644 (file)
@@ -92,7 +92,7 @@ MODULE_DEVICE_TABLE(of, pfuze_dt_ids);
 static int pfuze100_set_ramp_delay(struct regulator_dev *rdev, int ramp_delay)
 {
        struct pfuze_chip *pfuze100 = rdev_get_drvdata(rdev);
-       int id = rdev->desc->id;
+       int id = rdev_get_id(rdev);
        unsigned int ramp_bits;
        int ret;
 
index cd0b9e35a56d90ccc4fd78fe5fe781f2f009cd77..89966213315cd1e13708e7c0502bdd31d2044ceb 100644 (file)
@@ -65,7 +65,7 @@ static int s2mps11_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 S2MPS11_BUCK2:
                ramp_delay = s2mps11->ramp_delay2;
                break;
@@ -105,7 +105,7 @@ static int s2mps11_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 S2MPS11_BUCK1:
                if (ramp_delay > s2mps11->ramp_delay16)
                        s2mps11->ramp_delay16 = ramp_delay;