]> git.baikalelectronics.ru Git - kernel.git/commitdiff
OMAP: omap_device: fix nsec/usec conversion in latency calculations
authorKevin Hilman <khilman@deeprootsystems.com>
Tue, 8 Dec 2009 23:34:25 +0000 (16:34 -0700)
committerpaul <paul@twilight.(none)>
Sat, 12 Dec 2009 00:00:44 +0000 (17:00 -0700)
Use

   usecs = nsecs / NSEC_PER_USEC;

instead of

   usecs = nsecs * NSEC_PER_USEC;

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
arch/arm/plat-omap/omap_device.c

index 9a502af14f5b2402b250d195d1be51c1f5ae37ad..51c9d560a0cd070fde9043c3449ff8e0e91ae792 100644 (file)
@@ -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,