From: Kevin Hilman Date: Tue, 8 Dec 2009 23:34:25 +0000 (-0700) Subject: OMAP: omap_device: fix nsec/usec conversion in latency calculations X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d048ec7ab48254c505e1cee49441345ce12129fd;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git OMAP: omap_device: fix nsec/usec conversion in latency calculations Use usecs = nsecs / NSEC_PER_USEC; instead of usecs = nsecs * NSEC_PER_USEC; Signed-off-by: Kevin Hilman Signed-off-by: Paul Walmsley --- diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index 9a502af14f5b..51c9d560a0cd 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c @@ -142,7 +142,7 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat) read_persistent_clock(&b); c = timespec_sub(b, a); - act_lat = timespec_to_ns(&c) * NSEC_PER_USEC; + act_lat = timespec_to_ns(&c) / NSEC_PER_USEC; pr_debug("omap_device: %s: pm_lat %d: activate: elapsed time " "%llu usec\n", od->pdev.name, od->pm_lat_level, @@ -198,7 +198,7 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat) read_persistent_clock(&b); c = timespec_sub(b, a); - deact_lat = timespec_to_ns(&c) * NSEC_PER_USEC; + deact_lat = timespec_to_ns(&c) / NSEC_PER_USEC; pr_debug("omap_device: %s: pm_lat %d: deactivate: elapsed time " "%llu usec\n", od->pdev.name, od->pm_lat_level,