Skip to content

Commit 1eb208a

Browse files
committed
PM: Make CONFIG_PM depend on (CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME)
From the users' point of view CONFIG_PM is really only used for making it possible to set CONFIG_SUSPEND, CONFIG_HIBERNATION, CONFIG_PM_RUNTIME and (surprisingly enough) CONFIG_XEN_SAVE_RESTORE (CONFIG_PM_OPP also depends on CONFIG_PM, but quite artificially). However, both CONFIG_SUSPEND and CONFIG_HIBERNATION require platform support (independent of CONFIG_PM) and it is not quite obvious that CONFIG_PM has to be set for CONFIG_XEN_SAVE_RESTORE to be available. Thus, from the users' point of view, it would be more logical to automatically select CONFIG_PM if any of the above options depending on it are set. Make CONFIG_PM depend on (CONFIG_PM_SLEEP || CONFIG_PM_RUNTIME), which will cause it to be selected when any of CONFIG_SUSPEND, CONFIG_HIBERNATION, CONFIG_PM_RUNTIME, CONFIG_XEN_SAVE_RESTORE is set and will clarify its meaning. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
1 parent cd51e61 commit 1eb208a

File tree

2 files changed

+7
-24
lines changed

2 files changed

+7
-24
lines changed

arch/x86/xen/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ config XEN_MAX_DOMAIN_MEMORY
3838

3939
config XEN_SAVE_RESTORE
4040
bool
41-
depends on XEN && PM
41+
depends on XEN
4242
default y
4343

4444
config XEN_DEBUG_FS

kernel/power/Kconfig

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,7 @@
11
config PM
2-
bool "Power Management support"
3-
depends on !IA64_HP_SIM
4-
---help---
5-
"Power Management" means that parts of your computer are shut
6-
off or put into a power conserving "sleep" mode if they are not
7-
being used. There are two competing standards for doing this: APM
8-
and ACPI. If you want to use either one, say Y here and then also
9-
to the requisite support below.
10-
11-
Power Management is most important for battery powered laptop
12-
computers; if you have a laptop, check out the Linux Laptop home
13-
page on the WWW at <http://www.linux-on-laptops.com/> or
14-
Tuxmobil - Linux on Mobile Computers at <http://www.tuxmobil.org/>
15-
and the Battery Powered Linux mini-HOWTO, available from
16-
<http://www.tldp.org/docs.html#howto>.
17-
18-
Note that, even if you say N here, Linux on the x86 architecture
19-
will issue the hlt instruction if nothing is to be done, thereby
20-
sending the processor to sleep and saving power.
2+
bool
3+
depends on PM_SLEEP || PM_RUNTIME
4+
default y
215

226
config PM_DEBUG
237
bool "Power Management Debug Support"
@@ -102,7 +86,7 @@ config PM_SLEEP_ADVANCED_DEBUG
10286

10387
config SUSPEND
10488
bool "Suspend to RAM and standby"
105-
depends on PM && ARCH_SUSPEND_POSSIBLE
89+
depends on ARCH_SUSPEND_POSSIBLE
10690
default y
10791
---help---
10892
Allow the system to enter sleep states in which main memory is
@@ -133,7 +117,7 @@ config SUSPEND_FREEZER
133117

134118
config HIBERNATION
135119
bool "Hibernation (aka 'suspend to disk')"
136-
depends on PM && SWAP && ARCH_HIBERNATION_POSSIBLE
120+
depends on SWAP && ARCH_HIBERNATION_POSSIBLE
137121
select LZO_COMPRESS
138122
select LZO_DECOMPRESS
139123
---help---
@@ -224,7 +208,7 @@ config APM_EMULATION
224208

225209
config PM_RUNTIME
226210
bool "Run-time PM core functionality"
227-
depends on PM
211+
depends on !IA64_HP_SIM
228212
---help---
229213
Enable functionality allowing I/O devices to be put into energy-saving
230214
(low power) states at run time (or autosuspended) after a specified
@@ -246,7 +230,6 @@ config ARCH_HAS_OPP
246230

247231
config PM_OPP
248232
bool "Operating Performance Point (OPP) Layer library"
249-
depends on PM
250233
depends on ARCH_HAS_OPP
251234
---help---
252235
SOCs have a standard set of tuples consisting of frequency and

0 commit comments

Comments
 (0)