summaryrefslogtreecommitdiff
path: root/arch/arm
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2009-12-08 16:34:23 -0700
committerpaul <paul@twilight.(none)>2009-12-11 17:00:44 -0700
commitd22926677f2244a6b68e7ea21d6c9338659c17aa (patch)
treef90ca22cdb3728dad85c4afa07f6784003fd27e4 /arch/arm
parent5f1b6ef76ff87bb531a9304b36658b8ffaa91b08 (diff)
OMAP: omap_device: use read_persistent_clock() instead of getnstimeofday()
During suspend and resume, when omap_device deactivation and activation is happening, the timekeeping subsystem has likely already been suspended. Thus getnstimeofday() will fail and trigger a WARN(). Use read_persistent_clock() instead of getnstimeofday() to avoid this. Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/plat-omap/omap_device.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 54fe0a2f0b24..9a502af14f5b 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -134,12 +134,12 @@ static int _omap_device_activate(struct omap_device *od, u8 ignore_lat)
(od->dev_wakeup_lat <= od->_dev_wakeup_lat_limit))
break;
- getnstimeofday(&a);
+ read_persistent_clock(&a);
/* XXX check return code */
odpl->activate_func(od);
- getnstimeofday(&b);
+ read_persistent_clock(&b);
c = timespec_sub(b, a);
act_lat = timespec_to_ns(&c) * NSEC_PER_USEC;
@@ -190,12 +190,12 @@ static int _omap_device_deactivate(struct omap_device *od, u8 ignore_lat)
od->_dev_wakeup_lat_limit))
break;
- getnstimeofday(&a);
+ read_persistent_clock(&a);
/* XXX check return code */
odpl->deactivate_func(od);
- getnstimeofday(&b);
+ read_persistent_clock(&b);
c = timespec_sub(b, a);
deact_lat = timespec_to_ns(&c) * NSEC_PER_USEC;