[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1310149691.3348.6.camel@odin>
Date: Fri, 08 Jul 2011 19:28:11 +0100
From: Liam Girdwood <lrg@...mlogic.co.uk>
To: Donggeun Kim <dg77.kim@...sung.com>
Cc: linux-kernel@...r.kernel.org, lrg@...com,
broonie@...nsource.wolfsonmicro.com, myungjoo.ham@...sung.com,
kyungmin.park@...sung.com
Subject: Re: [PATCH] regulator: max8997: Fix setting inappropriate value
for ramp_delay variable
On Thu, 2011-07-07 at 16:51 +0900, Donggeun Kim wrote:
> The ramp_delay variable can be set lower than the desired value.
> This patch fixes it.
>
> Signed-off-by: Donggeun Kim <dg77.kim@...sung.com>
> Signed-off-by: MyungJoo Ham <myungjoo.ham@...sung.com>
> Signed-off-by: KyungMin Park <kyungmin.park@...sung.com>
> ---
> drivers/regulator/max8997.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/regulator/max8997.c b/drivers/regulator/max8997.c
> index 10d5a1d..682bc79 100644
> --- a/drivers/regulator/max8997.c
> +++ b/drivers/regulator/max8997.c
> @@ -543,7 +543,8 @@ static int max8997_set_voltage_ldobuck(struct regulator_dev *rdev,
> rid == MAX8997_BUCK4 || rid == MAX8997_BUCK5) {
> /* If the voltage is increasing */
> if (org < i)
> - udelay(desc->step * (i - org) / max8997->ramp_delay);
> + udelay(DIV_ROUND_UP(desc->step * (i - org),
> + max8997->ramp_delay));
> }
>
> return ret;
Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists