diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/power/common.c | 15 | ||||
-rw-r--r-- | drivers/base/power/domain.c | 2 | ||||
-rw-r--r-- | drivers/base/power/runtime.c | 2 |
3 files changed, 2 insertions, 17 deletions
diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c index cf7a85134730..39c32529b833 100644 --- a/drivers/base/power/common.c +++ b/drivers/base/power/common.c | |||
@@ -83,18 +83,3 @@ int dev_pm_put_subsys_data(struct device *dev) | |||
83 | return ret; | 83 | return ret; |
84 | } | 84 | } |
85 | EXPORT_SYMBOL_GPL(dev_pm_put_subsys_data); | 85 | EXPORT_SYMBOL_GPL(dev_pm_put_subsys_data); |
86 | |||
87 | /** | ||
88 | * dev_pm_syscore_device - Set/unset the given device's power.syscore flag. | ||
89 | * @dev: Device whose flag is to be modified. | ||
90 | * @val: New value of the flag. | ||
91 | */ | ||
92 | void dev_pm_syscore_device(struct device *dev, bool val) | ||
93 | { | ||
94 | unsigned long flags; | ||
95 | |||
96 | spin_lock_irqsave(&dev->power.lock, flags); | ||
97 | dev->power.syscore = val; | ||
98 | spin_unlock_irqrestore(&dev->power.lock, flags); | ||
99 | } | ||
100 | EXPORT_SYMBOL_GPL(dev_pm_syscore_device); | ||
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index d7e71b5b080e..5f4606f13be6 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c | |||
@@ -442,7 +442,7 @@ static int pm_genpd_poweroff(struct generic_pm_domain *genpd) | |||
442 | not_suspended = 0; | 442 | not_suspended = 0; |
443 | list_for_each_entry(pdd, &genpd->dev_list, list_node) | 443 | list_for_each_entry(pdd, &genpd->dev_list, list_node) |
444 | if (pdd->dev->driver && (!pm_runtime_suspended(pdd->dev) | 444 | if (pdd->dev->driver && (!pm_runtime_suspended(pdd->dev) |
445 | || pdd->dev->power.irq_safe || pdd->dev->power.syscore)) | 445 | || pdd->dev->power.irq_safe)) |
446 | not_suspended++; | 446 | not_suspended++; |
447 | 447 | ||
448 | if (not_suspended > genpd->in_progress) | 448 | if (not_suspended > genpd->in_progress) |
diff --git a/drivers/base/power/runtime.c b/drivers/base/power/runtime.c index bd1de3980919..7d9c1cb1c39a 100644 --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c | |||
@@ -134,7 +134,7 @@ static int rpm_check_suspend_allowed(struct device *dev) | |||
134 | 134 | ||
135 | if (dev->power.runtime_error) | 135 | if (dev->power.runtime_error) |
136 | retval = -EINVAL; | 136 | retval = -EINVAL; |
137 | else if (dev->power.disable_depth > 0 || dev->power.syscore) | 137 | else if (dev->power.disable_depth > 0) |
138 | retval = -EACCES; | 138 | retval = -EACCES; |
139 | else if (atomic_read(&dev->power.usage_count) > 0) | 139 | else if (atomic_read(&dev->power.usage_count) > 0) |
140 | retval = -EAGAIN; | 140 | retval = -EAGAIN; |