Skip to content

Commit

Permalink
OMAP: omap_device: fix nsec/usec conversion in latency calculations
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kevin Hilman authored and paul committed Dec 12, 2009
1 parent 81d7c6f commit d048ec7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm/plat-omap/omap_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit d048ec7

Please sign in to comment.