public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] OMAP: omap_device: fix nsec/usec conversion in latency calculations
@ 2009-11-23 17:33 Kevin Hilman
  2009-11-23 17:33 ` [PATCH 2/3] OMAP: omap_device: track latency in nanoseconds Kevin Hilman
  2009-12-01 12:55 ` [PATCH 1/3] OMAP: omap_device: fix nsec/usec conversion in latency calculations Paul Walmsley
  0 siblings, 2 replies; 6+ messages in thread
From: Kevin Hilman @ 2009-11-23 17:33 UTC (permalink / raw)
  To: linux-omap

Use

   usecs = nsecs / NSEC_PER_USEC;

instead of

   usecs = nsecs * NSEC_PER_USEC;

Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
 arch/arm/plat-omap/omap_device.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 288fd12..722f2c8 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,
-- 
1.6.5.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-12-01 12:55 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-23 17:33 [PATCH 1/3] OMAP: omap_device: fix nsec/usec conversion in latency calculations Kevin Hilman
2009-11-23 17:33 ` [PATCH 2/3] OMAP: omap_device: track latency in nanoseconds Kevin Hilman
2009-11-23 17:33   ` [PATCH 3/3] OMAP: omap_device: optionally auto-adjust device activate/deactivate latencies Kevin Hilman
2009-11-23 18:35     ` Kevin Hilman
2009-12-01 12:55   ` [PATCH 2/3] OMAP: omap_device: track latency in nanoseconds Paul Walmsley
2009-12-01 12:55 ` [PATCH 1/3] OMAP: omap_device: fix nsec/usec conversion in latency calculations Paul Walmsley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox