dect
/
linux-2.6
Archived
13
0
Fork 0

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 <khilman@deeprootsystems.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
This commit is contained in:
Kevin Hilman 2009-12-08 16:34:25 -07:00 committed by paul
parent 81d7c6ffcc
commit d048ec7ab4
1 changed files with 2 additions and 2 deletions

View 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,