From: Tero Kristo Date: Mon, 26 Oct 2009 13:10:40 +0000 (+0200) Subject: OMAP3: CPUidle: Fixed timer resolution X-Git-Tag: v2.6.33-rc6~30^2~2^2~9 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=afbcf6197d78aed814e90bad6099ecfbeb756ec1;p=~emulex%2Finfiniband.git OMAP3: CPUidle: Fixed timer resolution Previously used u32 as temporary data storage that wraps around at 4.294s. Signed-off-by: Tero Kristo Signed-off-by: Kevin Hilman --- diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c index a26d6a08ae3..12f0cbfc289 100644 --- a/arch/arm/mach-omap2/cpuidle34xx.c +++ b/arch/arm/mach-omap2/cpuidle34xx.c @@ -137,7 +137,7 @@ return_sleep_time: local_irq_enable(); local_fiq_enable(); - return (u32)timespec_to_ns(&ts_idle)/1000; + return ts_idle.tv_nsec / NSEC_PER_USEC + ts_idle.tv_sec * USEC_PER_SEC; } /**