aboutsummaryrefslogtreecommitdiffstats
diff options
-rw-r--r--driver-core/platform_bus-allow-custom-extensions-to-system-pm-methods.patch65
-rw-r--r--series1
2 files changed, 66 insertions, 0 deletions
diff --git a/driver-core/platform_bus-allow-custom-extensions-to-system-pm-methods.patch b/driver-core/platform_bus-allow-custom-extensions-to-system-pm-methods.patch
new file mode 100644
index 00000000000000..14dfd842e2b741
--- /dev/null
+++ b/driver-core/platform_bus-allow-custom-extensions-to-system-pm-methods.patch
@@ -0,0 +1,65 @@
+From khilman@deeprootsystems.com Thu Mar 18 11:39:45 2010
+From: Kevin Hilman <khilman@deeprootsystems.com>
+Date: Wed, 17 Mar 2010 16:18:15 -0700
+Subject: platform_bus: allow custom extensions to system PM methods
+Cc: Greg Kroah-Hartman <gregkh@suse.de>, Magnus Damm <damm@opensource.se>, "Rafael J. Wysocki" <rjw@sisk.pl>, Dmitry Torokhov <dtor@mail.ru>, Eric Miao <eric.y.miao@gmail.com>
+Message-ID: <1268867896-7616-1-git-send-email-khilman@deeprootsystems.com>
+
+
+When runtime PM for platform_bus was added, it allowed for platforms
+to customize the runtime PM methods since they are defined as weak
+symbols.
+
+This patch allows platforms to also extend the system PM methods with
+custom hooks so runtime PM and system PM extensions can be managed
+together by custom platform-specific code.
+
+Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
+Cc: Magnus Damm <damm@opensource.se>
+Cc: Rafael Wysocki <rjw@sisk.pl>
+Cc: Dmitry Torokhov <dtor@mail.ru>
+Cc: Eric Miao <eric.y.miao@gmail.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/base/platform.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/base/platform.c
++++ b/drivers/base/platform.c
+@@ -729,7 +729,7 @@ static void platform_pm_complete(struct
+
+ #ifdef CONFIG_SUSPEND
+
+-static int platform_pm_suspend(struct device *dev)
++int __weak platform_pm_suspend(struct device *dev)
+ {
+ struct device_driver *drv = dev->driver;
+ int ret = 0;
+@@ -747,7 +747,7 @@ static int platform_pm_suspend(struct de
+ return ret;
+ }
+
+-static int platform_pm_suspend_noirq(struct device *dev)
++int __weak platform_pm_suspend_noirq(struct device *dev)
+ {
+ struct device_driver *drv = dev->driver;
+ int ret = 0;
+@@ -763,7 +763,7 @@ static int platform_pm_suspend_noirq(str
+ return ret;
+ }
+
+-static int platform_pm_resume(struct device *dev)
++int __weak platform_pm_resume(struct device *dev)
+ {
+ struct device_driver *drv = dev->driver;
+ int ret = 0;
+@@ -781,7 +781,7 @@ static int platform_pm_resume(struct dev
+ return ret;
+ }
+
+-static int platform_pm_resume_noirq(struct device *dev)
++int __weak platform_pm_resume_noirq(struct device *dev)
+ {
+ struct device_driver *drv = dev->driver;
+ int ret = 0;
diff --git a/series b/series
index a06c7f1297ce78..7a746b287b0d35 100644
--- a/series
+++ b/series
@@ -101,6 +101,7 @@ driver-core/driver-core-don-t-initialize-wakeup-flags.patch
driver-core/driver-core-early-dev_name-support.patch
driver-core/driver-core-module.c-use-kasprintf.patch
driver-core/devtmpfs-support-config_tmpfs.patch
+driver-core/platform_bus-allow-custom-extensions-to-system-pm-methods.patch
# will we make it this time???
driver-core/drivers-base-convert-sema.patch