Commit d048ec7a authored by Kevin Hilman's avatar Kevin Hilman Committed by paul

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: default avatarKevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: default avatarPaul Walmsley <paul@pwsan.com>
parent 81d7c6ff
...@@ -142,7 +142,7 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat) ...@@ -142,7 +142,7 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
read_persistent_clock(&b); read_persistent_clock(&b);
c = timespec_sub(b, a); 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 " pr_debug("omap_device: %s: pm_lat %d: activate: elapsed time "
"%llu usec\n", od->pdev.name, od->pm_lat_level, "%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) ...@@ -198,7 +198,7 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
read_persistent_clock(&b); read_persistent_clock(&b);
c = timespec_sub(b, a); 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 " pr_debug("omap_device: %s: pm_lat %d: deactivate: elapsed time "
"%llu usec\n", od->pdev.name, od->pm_lat_level, "%llu usec\n", od->pdev.name, od->pm_lat_level,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment