diff options
-rw-r--r-- | drivers/base/power/domain_governor.c | 24 |
1 files changed, 19 insertions, 5 deletions
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 | */ |