From 42202f914863572b3a76491f19caad53a9bdeede Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Mon, 4 Jun 2012 12:44:15 +0800 Subject: [PATCH] --- yaml --- r: 312527 b: refs/heads/master c: ea7e33045458ffd6d13175031527b6527807633c h: refs/heads/master i: 312525: 07b4cf7023f071d892e5656a537c6fc6b656bb87 312523: b42435a96da54ca81a7b5520967be8e5deed0964 312519: 3da2a63ffac175871f5c323da62633d74c6c1f55 312511: 663a7a10f961c4fca531f4a61d76870609ac9c7b v: v3 --- [refs] | 2 +- trunk/drivers/regulator/twl-regulator.c | 13 +++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/[refs] b/[refs] index 9d62fc64935d..6c4ecaf9a8f4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e4a99938706b080b562055f83bf29e28ce0770ad +refs/heads/master: ea7e33045458ffd6d13175031527b6527807633c diff --git a/trunk/drivers/regulator/twl-regulator.c b/trunk/drivers/regulator/twl-regulator.c index c7390711d954..a1d07e517db3 100644 --- a/trunk/drivers/regulator/twl-regulator.c +++ b/trunk/drivers/regulator/twl-regulator.c @@ -577,13 +577,6 @@ static struct regulator_ops twl6030coresmps_ops = { .get_voltage = twl6030coresmps_get_voltage, }; -static int twl6030ldo_list_voltage(struct regulator_dev *rdev, unsigned index) -{ - struct twlreg_info *info = rdev_get_drvdata(rdev); - - return ((info->min_mV + (index * 100)) * 1000); -} - static int twl6030ldo_set_voltage(struct regulator_dev *rdev, int min_uV, int max_uV, unsigned *selector) @@ -621,7 +614,7 @@ static int twl6030ldo_get_voltage(struct regulator_dev *rdev) } static struct regulator_ops twl6030ldo_ops = { - .list_voltage = twl6030ldo_list_voltage, + .list_voltage = regulator_list_voltage_linear, .set_voltage = twl6030ldo_set_voltage, .get_voltage = twl6030ldo_get_voltage, @@ -959,6 +952,8 @@ static struct twlreg_info TWL6030_INFO_##label = { \ .ops = &twl6030ldo_ops, \ .type = REGULATOR_VOLTAGE, \ .owner = THIS_MODULE, \ + .min_uV = min_mVolts * 1000, \ + .uV_step = 100 * 1000, \ }, \ } @@ -974,6 +969,8 @@ static struct twlreg_info TWL6025_INFO_##label = { \ .ops = &twl6030ldo_ops, \ .type = REGULATOR_VOLTAGE, \ .owner = THIS_MODULE, \ + .min_uV = min_mVolts * 1000, \ + .uV_step = 100 * 1000, \ }, \ }