aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/omap-pm-noop.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-omap/omap-pm-noop.c')
-rw-r--r--arch/arm/plat-omap/omap-pm-noop.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/arm/plat-omap/omap-pm-noop.c b/arch/arm/plat-omap/omap-pm-noop.c
index 19cb9f5..af58dad 100644
--- a/arch/arm/plat-omap/omap-pm-noop.c
+++ b/arch/arm/plat-omap/omap-pm-noop.c
@@ -20,9 +20,11 @@
#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/device.h>
+#include <linux/platform_device.h>
/* Interface documentation is in mach/omap-pm.h */
#include <plat/omap-pm.h>
+#include <plat/omap_device.h>
/*
* Device-driver-originated constraints (via board-*.c files)
@@ -282,22 +284,19 @@ unsigned long omap_pm_cpu_get_freq(void)
* Device context loss tracking
*/
-int omap_pm_get_dev_context_loss_count(struct device *dev)
+u32 omap_pm_get_dev_context_loss_count(struct device *dev)
{
- if (!dev) {
- WARN_ON(1);
- return -EINVAL;
- };
+ struct platform_device *pdev = to_platform_device(dev);
+ u32 count;
- pr_debug("OMAP PM: returning context loss count for dev %s\n",
- dev_name(dev));
+ if (WARN_ON(!dev))
+ return 0;
- /*
- * Map the device to the powerdomain. Return the powerdomain
- * off counter.
- */
+ count = omap_device_get_context_loss_count(pdev);
+ pr_debug("OMAP PM: context loss count for dev %s = %d\n",
+ dev_name(dev), count);
- return 0;
+ return count;
}