summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorramesh.chandrasekaran <ramesh.chandrasekaran@stericsson.com>2012-05-17 13:27:00 +0200
committerPhilippe Langlais <philippe.langlais@stericsson.com>2012-05-25 08:29:34 +0200
commitb7fc8f58e7c13b9f14c304517b02fe09c1350ae2 (patch)
treeb4b2ea919f6adc60889a5a95d1a35f6275e9f102
parent6dd0f265d19f5bf7e3e88aa9541dffb35a6e74ab (diff)
core: Fix for Basic Suspend/Resume to work
Signed-off-by: ramesh.chandrasekaran <ramesh.chandrasekaran@stericsson.com>
-rw-r--r--drivers/amba/bus.c12
-rw-r--r--include/linux/amba/bus.h20
2 files changed, 26 insertions, 6 deletions
diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index 54eaf96ab21..f5a8d93cad4 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -117,7 +117,7 @@ static int amba_legacy_resume(struct device *dev)
#ifdef CONFIG_SUSPEND
-static int amba_pm_suspend(struct device *dev)
+int amba_pm_suspend(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;
@@ -135,7 +135,7 @@ static int amba_pm_suspend(struct device *dev)
return ret;
}
-static int amba_pm_resume(struct device *dev)
+int amba_pm_resume(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;
@@ -162,7 +162,7 @@ static int amba_pm_resume(struct device *dev)
#ifdef CONFIG_HIBERNATE_CALLBACKS
-static int amba_pm_freeze(struct device *dev)
+int amba_pm_freeze(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;
@@ -180,7 +180,7 @@ static int amba_pm_freeze(struct device *dev)
return ret;
}
-static int amba_pm_thaw(struct device *dev)
+int amba_pm_thaw(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;
@@ -198,7 +198,7 @@ static int amba_pm_thaw(struct device *dev)
return ret;
}
-static int amba_pm_poweroff(struct device *dev)
+int amba_pm_poweroff(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;
@@ -216,7 +216,7 @@ static int amba_pm_poweroff(struct device *dev)
return ret;
}
-static int amba_pm_restore(struct device *dev)
+int amba_pm_restore(struct device *dev)
{
struct device_driver *drv = dev->driver;
int ret = 0;
diff --git a/include/linux/amba/bus.h b/include/linux/amba/bus.h
index 724c69c40bb..bc1190b4782 100644
--- a/include/linux/amba/bus.h
+++ b/include/linux/amba/bus.h
@@ -90,3 +90,23 @@ void amba_release_regions(struct amba_device *);
#define amba_part(d) AMBA_PART_BITS((d)->periphid)
#endif
+
+#ifdef CONFIG_SUSPEND
+extern int amba_pm_suspend(struct device *dev);
+extern int amba_pm_resume(struct device *dev);
+#else
+#define amba_pm_suspend NULL
+#define amba_pm_resume NULL
+#endif
+
+#ifdef CONFIG_HIBERNATE_CALLBACKS
+extern int amba_pm_freeze(struct device *dev);
+extern int amba_pm_thaw(struct device *dev);
+extern int amba_pm_poweroff(struct device *dev);
+extern int amba_pm_restore(struct device *dev);
+#else
+#define amba_pm_freeze NULL
+#define amba_pm_thaw NULL
+#define amba_pm_poweroff NULL
+#define amba_pm_restore NULL
+#endif