From: Phil Carmody <[email protected]>

kernel.h provides a function for DIV_ROUND_UP which should be used
instead of replicating it in code.

Cc: Ambresh K <[email protected]>
Cc: Benoit Cousson <[email protected]>
Cc: Eduardo Valentin <[email protected]>
Cc: Kevin Hilman <[email protected]>
Cc: Sanjeev Premi <[email protected]>
Cc: Tero Kristo <[email protected]>
Cc: Thara Gopinath <[email protected]>

Signed-off-by: Nishanth Menon <[email protected]>
Signed-off-by: Phil Carmody <[email protected]>
---
 arch/arm/plat-omap/opp_twl_tps.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/opp_twl_tps.c b/arch/arm/plat-omap/opp_twl_tps.c
index 468fb97..112f106 100644
--- a/arch/arm/plat-omap/opp_twl_tps.c
+++ b/arch/arm/plat-omap/opp_twl_tps.c
@@ -37,5 +37,5 @@ unsigned long omap_twl_vsel_to_uv(const u8 vsel)
 u8 omap_twl_uv_to_vsel(unsigned long uv)
 {
        /* Round up to higher voltage */
-       return (((uv + 99) / 100 - 6000) + 124) / 125;
+       return DIV_ROUND_UP(uv - 600000, 12500);
 }
-- 
1.6.3.3

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to