aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2012-08-13 08:00:25 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2012-09-03 19:36:05 -0400
commitfeb70af0e3ac6817327be70b47731039ea135dbc (patch)
tree7df6ab174688d8bcc637af0d7a8fc7beb6a1e2aa /include/linux/device.h
parent3cb6f10a4d925ec21f414bc30a8aded2830963e5 (diff)
PM: Do not use the syscore flag for runtime PM
The syscore device PM flag used to mark the devices (belonging to PM domains) that should never be turned off, except for the system core (syscore) suspend/hibernation and resume stages, need not be accessed by the runtime PM core functions, because all of the devices it is set for need to be marked as "irq safe" anyway and are protected from being turned off by runtime PM by ensuring that their usage counters are always set. For this reason, make the syscore flag system-wide PM-specific and simplify the code used for manipulating it, because it need not acquire the device's power.lock any more. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 52a5f15a2223..86529e642d6c 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -772,6 +772,13 @@ static inline void pm_suspend_ignore_children(struct device *dev, bool enable)
772 dev->power.ignore_children = enable; 772 dev->power.ignore_children = enable;
773} 773}
774 774
775static inline void dev_pm_syscore_device(struct device *dev, bool val)
776{
777#ifdef CONFIG_PM_SLEEP
778 dev->power.syscore = val;
779#endif
780}
781
775static inline void device_lock(struct device *dev) 782static inline void device_lock(struct device *dev)
776{ 783{
777 mutex_lock(&dev->mutex); 784 mutex_lock(&dev->mutex);