regulator: max77802: Remove duplicate rdev_get_id() call
authorAxel Lin <axel.lin@ingics.com>
Fri, 5 Sep 2014 01:17:41 +0000 (09:17 +0800)
committerMark Brown <broonie@kernel.org>
Fri, 5 Sep 2014 10:34:12 +0000 (11:34 +0100)
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/max77802.c

index 967e10934d3ee6d9ef5b9a3aa1d3ac647b332f06..d89792b084e937a9fd29bbc28defe65ab6c07959 100644 (file)
@@ -134,7 +134,7 @@ static int max77802_ldo_set_suspend_mode_logic1(struct regulator_dev *rdev,
                return -EINVAL;
        }
 
-       max77802->opmode[rdev_get_id(rdev)] = val;
+       max77802->opmode[id] = val;
        return regmap_update_bits(rdev->regmap, rdev->desc->enable_reg,
                                  rdev->desc->enable_mask, val << shift);
 }
@@ -167,7 +167,7 @@ static int max77802_ldo_set_suspend_mode_logic2(struct regulator_dev *rdev,
                return -EINVAL;
        }
 
-       max77802->opmode[rdev_get_id(rdev)] = val;
+       max77802->opmode[id] = val;
        return regmap_update_bits(rdev->regmap, rdev->desc->enable_reg,
                                  rdev->desc->enable_mask, val << shift);
 }