From: Greg Kroah-Hartman <gregkh@suse.de>
To: linux-kernel@vger.kernel.org
Cc: Kevin Hilman <khilman@deeprootsystems.com>,
Magnus Damm <damm@opensource.se>, Rafael Wysocki <rjw@sisk.pl>,
Dmitry Torokhov <dtor@mail.ru>, Eric Miao <eric.y.miao@gmail.com>,
Greg Kroah-Hartman <gregkh@suse.de>
Subject: [PATCH 09/38] platform_bus: allow custom extensions to system PM methods
Date: Fri, 21 May 2010 09:53:39 -0700 [thread overview]
Message-ID: <1274460848-11377-9-git-send-email-gregkh@suse.de> (raw)
In-Reply-To: <20100521165106.GA11216@kroah.com>
From: Kevin Hilman <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 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/base/platform.c b/drivers/base/platform.c
index ada6397..4d99c8b 100644
--- a/drivers/base/platform.c
+++ b/drivers/base/platform.c
@@ -735,7 +735,7 @@ static void platform_pm_complete(struct device *dev)
#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;
@@ -753,7 +753,7 @@ static int platform_pm_suspend(struct device *dev)
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;
@@ -769,7 +769,7 @@ static int platform_pm_suspend_noirq(struct device *dev)
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;
@@ -787,7 +787,7 @@ static int platform_pm_resume(struct device *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;
--
1.7.0.3
next prev parent reply other threads:[~2010-05-21 17:01 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-21 16:51 [GIT PATCH] driver core patches for .35 Greg KH
2010-05-21 16:53 ` [PATCH 01/38] drivers/base/cpu.c: fix the output from /sys/devices/system/cpu/offline Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 02/38] firmware_class: fix memory leak - free allocated pages Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 03/38] kref: remove kref_set Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 04/38] Driver core: Reduce the level of request_firmware() messages Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 05/38] driver-core: fix potential race condition in drivers/base/dd.c Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 06/38] Driver core: don't initialize wakeup flags Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 07/38] driver core: module.c: Use kasprintf Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 08/38] devtmpfs: support !CONFIG_TMPFS Greg Kroah-Hartman
2010-05-21 16:53 ` Greg Kroah-Hartman [this message]
2010-05-21 16:53 ` [PATCH 10/38] drivers/base: Convert dev->sem to mutex Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 11/38] lockdep: Add novalidate class for dev->mutex conversion Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 12/38] firmware class: export nowait to userspace Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 13/38] firmware loader: rely on driver core to create class attribute Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 14/38] firmware loader: split out builtin firmware handling Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 15/38] firmware loader: do not allocate firmare id separately Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 16/38] Driver core: Protect device shutdown from hot unplug events Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 17/38] generate "change" uevent for loop device Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 18/38] sysfs: Basic support for multiple super blocks Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 19/38] sysfs: Remove double free sysfs_get_sb Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 20/38] kobj: Add basic infrastructure for dealing with namespaces Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 21/38] sysfs: Implement sysfs tagged directory support Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 22/38] sysfs: Add support for tagged directories with untagged members Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 23/38] sysfs: Implement sysfs_delete_link Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 24/38] driver core: Implement ns directory support for device classes Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 25/38] sysfs: Comment sysfs directory tagging logic Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 26/38] sysfs-namespaces: add a high-level Documentation file Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 27/38] sysfs: Don't use enums in inline function declaration Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 28/38] sysfs: Remove usage of S_BIAS to avoid merge conflict with the vfs tree Greg Kroah-Hartman
2010-05-21 16:53 ` [PATCH 29/38] sysfs: add struct file* to bin_attr callbacks Greg Kroah-Hartman
2010-05-21 16:54 ` [PATCH 30/38] pci: check caps from sysfs file open to read device dependent config space Greg Kroah-Hartman
2010-05-21 16:54 ` [PATCH 31/38] driver-core: fix Typo in drivers/base/core.c for CONFIG_MODULE Greg Kroah-Hartman
2010-05-21 16:54 ` [PATCH 32/38] kobject: Send hotplug events in all network namespaces Greg Kroah-Hartman
2010-05-21 16:54 ` [PATCH 33/38] netns: Teach network device kobjects which namespace they are in Greg Kroah-Hartman
2010-05-21 16:54 ` [PATCH 34/38] net/sysfs: Fix the bitrot in network device kobject namespace support Greg Kroah-Hartman
2010-05-21 16:54 ` [PATCH 35/38] netlink: Implment netlink_broadcast_filtered Greg Kroah-Hartman
2010-05-21 16:54 ` [PATCH 36/38] kobj: Send hotplug events in the proper namespace Greg Kroah-Hartman
2010-05-21 16:54 ` [PATCH 37/38] hotplug: netns aware uevent_helper Greg Kroah-Hartman
2010-05-21 16:54 ` [PATCH 38/38] net: Expose all network devices in a namespaces in sysfs Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1274460848-11377-9-git-send-email-gregkh@suse.de \
--to=gregkh@suse.de \
--cc=damm@opensource.se \
--cc=dtor@mail.ru \
--cc=eric.y.miao@gmail.com \
--cc=khilman@deeprootsystems.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox