Re: [PM-WIP-OPP][PATCH 2/2] omap: pm: opp: twl: use DIV_ROUND_UP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nishanth Menon <nm@xxxxxx> writes:

> From: Phil Carmody <ext-phil.2.carmody@xxxxxxxxx>
>
> kernel.h provides a function for DIV_ROUND_UP which should be used
> instead of replicating it in code.
>
> Cc: Ambresh K <ambresh@xxxxxx>
> Cc: Benoit Cousson <b-cousson@xxxxxx>
> Cc: Eduardo Valentin <eduardo.valentin@xxxxxxxxx>
> Cc: Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx>
> Cc: Sanjeev Premi <premi@xxxxxx>
> Cc: Tero Kristo <tero.kristo@xxxxxxxxx>
> Cc: Thara Gopinath <thara@xxxxxx>
>
> Signed-off-by: Nishanth Menon <nm@xxxxxx>
> Signed-off-by: Phil Carmody <ext-phil.2.carmody@xxxxxxxxx>

Nice.  Applied to pm-wip-opp.

Kevin

> ---
>  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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux