[ 3.5.y.z extended stable ] Patch "regulator: max8998: Ensure enough delay time for" has been added to staging queue
Herton Ronaldo Krzesinski
herton.krzesinski at canonical.com
Wed Jan 23 04:43:10 UTC 2013
This is a note to let you know that I have just added a patch titled
regulator: max8998: Ensure enough delay time for
to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Herton
------
>From d9a408d96739d4f314d92035908c9c534a709f23 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin at ingics.com>
Date: Wed, 9 Jan 2013 19:34:57 +0800
Subject: [PATCH] regulator: max8998: Ensure enough delay time for
max8998_set_voltage_buck_time_sel
commit 81d0a6ae7befb24c06f4aa4856af7f8d1f612171 upstream.
Use DIV_ROUND_UP to prevent truncation by integer division issue.
This ensures we return enough delay time.
Signed-off-by: Axel Lin <axel.lin at ingics.com>
Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski at canonical.com>
---
drivers/regulator/max8998.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index 5e56df0..b3b2984 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -447,7 +447,7 @@ static int max8998_set_voltage_buck_time_sel(struct regulator_dev *rdev,
difference = (new_selector - old_selector) * desc->step / 1000;
if (difference > 0)
- return difference / ((val & 0x0f) + 1);
+ return DIV_ROUND_UP(difference, (val & 0x0f) + 1);
return 0;
}
--
1.7.9.5
More information about the kernel-team
mailing list