diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-16 18:02:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-16 18:02:30 -0500 |
commit | 97740400bc76b64781d01f8cdfbcf750582006ef (patch) | |
tree | 85900329fbce72011339ab2348dcf13dde2a64fd /drivers | |
parent | 408e057870c8680a50963b08f9f7efaa151a74ec (diff) | |
parent | ee34a37049114303011e154478c63b977bcff24c (diff) |
Merge branch 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
* 'pm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM / Hibernate: Drop the check of swap space size for compressed image
PM / shmobile: fix A3SP suspend method
PM / Domains: Skip governor functions for CONFIG_PM_RUNTIME unset
PM / Domains: Fix build for CONFIG_PM_SLEEP unset
PM: Make sysrq-o be available for CONFIG_PM unset
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/power/domain.c | 15 | ||||
-rw-r--r-- | drivers/base/power/domain_governor.c | 24 |
2 files changed, 34 insertions, 5 deletions
diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c index 92e6a9048065..978bbf7ac6af 100644 --- a/drivers/base/power/domain.c +++ b/drivers/base/power/domain.c | |||
@@ -1429,6 +1429,8 @@ static int pm_genpd_default_restore_state(struct device *dev) | |||
1429 | return 0; | 1429 | return 0; |
1430 | } | 1430 | } |
1431 | 1431 | ||
1432 | #ifdef CONFIG_PM_SLEEP | ||
1433 | |||
1432 | /** | 1434 | /** |
1433 | * pm_genpd_default_suspend - Default "device suspend" for PM domians. | 1435 | * pm_genpd_default_suspend - Default "device suspend" for PM domians. |
1434 | * @dev: Device to handle. | 1436 | * @dev: Device to handle. |
@@ -1517,6 +1519,19 @@ static int pm_genpd_default_thaw(struct device *dev) | |||
1517 | return cb ? cb(dev) : pm_generic_thaw(dev); | 1519 | return cb ? cb(dev) : pm_generic_thaw(dev); |
1518 | } | 1520 | } |
1519 | 1521 | ||
1522 | #else /* !CONFIG_PM_SLEEP */ | ||
1523 | |||
1524 | #define pm_genpd_default_suspend NULL | ||
1525 | #define pm_genpd_default_suspend_late NULL | ||
1526 | #define pm_genpd_default_resume_early NULL | ||
1527 | #define pm_genpd_default_resume NULL | ||
1528 | #define pm_genpd_default_freeze NULL | ||
1529 | #define pm_genpd_default_freeze_late NULL | ||
1530 | #define pm_genpd_default_thaw_early NULL | ||
1531 | #define pm_genpd_default_thaw NULL | ||
1532 | |||
1533 | #endif /* !CONFIG_PM_SLEEP */ | ||
1534 | |||
1520 | /** | 1535 | /** |
1521 | * pm_genpd_init - Initialize a generic I/O PM domain object. | 1536 | * pm_genpd_init - Initialize a generic I/O PM domain object. |
1522 | * @genpd: PM domain object to initialize. | 1537 | * @genpd: PM domain object to initialize. |
diff --git a/drivers/base/power/domain_governor.c b/drivers/base/power/domain_governor.c index 51527ee92d10..66a265bf5867 100644 --- a/drivers/base/power/domain_governor.c +++ b/drivers/base/power/domain_governor.c | |||
@@ -12,6 +12,8 @@ | |||
12 | #include <linux/pm_qos.h> | 12 | #include <linux/pm_qos.h> |
13 | #include <linux/hrtimer.h> | 13 | #include <linux/hrtimer.h> |
14 | 14 | ||
15 | #ifdef CONFIG_PM_RUNTIME | ||
16 | |||
15 | /** | 17 | /** |
16 | * default_stop_ok - Default PM domain governor routine for stopping devices. | 18 | * default_stop_ok - Default PM domain governor routine for stopping devices. |
17 | * @dev: Device to check. | 19 | * @dev: Device to check. |
@@ -137,16 +139,28 @@ static bool default_power_down_ok(struct dev_pm_domain *pd) | |||
137 | return true; | 139 | return true; |
138 | } | 140 | } |
139 | 141 | ||
140 | struct dev_power_governor simple_qos_governor = { | ||
141 | .stop_ok = default_stop_ok, | ||
142 | .power_down_ok = default_power_down_ok, | ||
143 | }; | ||
144 | |||
145 | static bool always_on_power_down_ok(struct dev_pm_domain *domain) | 142 | static bool always_on_power_down_ok(struct dev_pm_domain *domain) |
146 | { | 143 | { |
147 | return false; | 144 | return false; |
148 | } | 145 | } |
149 | 146 | ||
147 | #else /* !CONFIG_PM_RUNTIME */ | ||
148 | |||
149 | bool default_stop_ok(struct device *dev) | ||
150 | { | ||
151 | return false; | ||
152 | } | ||
153 | |||
154 | #define default_power_down_ok NULL | ||
155 | #define always_on_power_down_ok NULL | ||
156 | |||
157 | #endif /* !CONFIG_PM_RUNTIME */ | ||
158 | |||
159 | struct dev_power_governor simple_qos_governor = { | ||
160 | .stop_ok = default_stop_ok, | ||
161 | .power_down_ok = default_power_down_ok, | ||
162 | }; | ||
163 | |||
150 | /** | 164 | /** |
151 | * pm_genpd_gov_always_on - A governor implementing an always-on policy | 165 | * pm_genpd_gov_always_on - A governor implementing an always-on policy |
152 | */ | 166 | */ |