summaryrefslogtreecommitdiff
path: root/drivers/regulator/tps65218-regulator.c
diff options
context:
space:
mode:
authorKeerthy <j-keerthy@ti.com>2016-09-19 13:09:02 +0530
committerLee Jones <lee.jones@linaro.org>2016-10-26 10:30:02 +0100
commit0aced355757ddc150f78a6bf4f8d885bd4eaf0e2 (patch)
tree2fdeaef6823af7af287d4484fae7230c18e986d1 /drivers/regulator/tps65218-regulator.c
parent1001354ca34179f3db924eb66672442a173147dc (diff)
mfd: tps65218: Remove redundant read wrapper
Currently read directly calls the repmap read function. Hence remove the redundant wrapper and use regmap read wherever needed. Signed-off-by: Keerthy <j-keerthy@ti.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/regulator/tps65218-regulator.c')
-rw-r--r--drivers/regulator/tps65218-regulator.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c
index eb0f5b13841a..ae16caf4151c 100644
--- a/drivers/regulator/tps65218-regulator.c
+++ b/drivers/regulator/tps65218-regulator.c
@@ -22,6 +22,7 @@
#include <linux/err.h>
#include <linux/platform_device.h>
#include <linux/of_device.h>
+#include <linux/regmap.h>
#include <linux/regulator/of_regulator.h>
#include <linux/regulator/driver.h>
#include <linux/regulator/machine.h>
@@ -272,7 +273,7 @@ static int tps65218_pmic_get_current_limit(struct regulator_dev *dev)
unsigned int index;
struct tps65218 *tps = rdev_get_drvdata(dev);
- retval = tps65218_reg_read(tps, dev->desc->csel_reg, &index);
+ retval = regmap_read(tps->regmap, dev->desc->csel_reg, &index);
if (retval < 0)
return retval;
@@ -383,7 +384,7 @@ static int tps65218_regulator_probe(struct platform_device *pdev)
return PTR_ERR(rdev);
}
- ret = tps65218_reg_read(tps, regulators[id].bypass_reg, &val);
+ ret = regmap_read(tps->regmap, regulators[id].bypass_reg, &val);
if (ret)
return ret;