Skip to contentSkip to conversation

remove incorrect dependancy on CONFIG_APM

PATCH Dave Jones 2 participants 4 messages Dec 20, 2005 – Dec 23, 2005

lore
Share & tools
lore

Dave Jones

author
#0 lore raw
Quoted 2 lines

From the PM_LEGACY Kconfig description..

"Support for pm_register() and friends."

Note, no mention of 'make apm stop working'.

arch/i386/Kconfig renamed from arch/i386/Kconfig~ +1 -1
@@ -710,7 +710,7 @@ depends on PM && !X86_VISWS
 
 config APM
 	tristate "APM (Advanced Power Management) BIOS support"
-	depends on PM && PM_LEGACY
+	depends on PM
 	---help---
 	  APM is a BIOS specification for saving power using several different
 	  techniques. This is mostly useful for battery powered laptops with
#1 lore raw
Quoted 12 lines · Dave Jones
Quoted 2 lines

From the PM_LEGACY Kconfig description..

"Support for pm_register() and friends."

Note, no mention of 'make apm stop working'.

arch/i386/Kconfig depends on PM && !X86_VISWS · line 713

Quoted 6 lines
arch/i386/Kconfig renamed from arch/i386/Kconfig~ +1 -1
@@ -710,7 +710,7 @@ depends on PM && !X86_VISWS
 
 config APM
 	tristate "APM (Advanced Power Management) BIOS support"
-	depends on PM && PM_LEGACY
+	depends on PM
...

This doesn't compile:

<-- snip -->

...
CC arch/i386/kernel/apm.o
arch/i386/kernel/apm.c: In function 'apm_init':
arch/i386/kernel/apm.c:2304: error: 'pm_active' undeclared (first use in this function) arch/i386/kernel/apm.c:2304: error: (Each undeclared identifier is reported only once arch/i386/kernel/apm.c:2304: error: for each function it appears in.) arch/i386/kernel/apm.c: In function 'apm_exit':
arch/i386/kernel/apm.c:2410: error: 'pm_active' undeclared (first use in this function) make[1]: *** [arch/i386/kernel/apm.o] Error 1

<-- snip -->

If PM_LEGACY causes user confusion for APM users, commit bca73e4bf8563d83f7856164caa44d5f42e44cca should be reverted.

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
author
#2 lore raw
Quoted 34 lines · Adrian Bunk
Quoted 12 lines · Dave Jones
Quoted 2 lines

From the PM_LEGACY Kconfig description..

"Support for pm_register() and friends."

Note, no mention of 'make apm stop working'.

arch/i386/Kconfig depends on PM && !X86_VISWS · line 713

Quoted 6 lines
arch/i386/Kconfig renamed from arch/i386/Kconfig~ +1 -1
@@ -710,7 +710,7 @@ depends on PM && !X86_VISWS
 
 config APM
 	tristate "APM (Advanced Power Management) BIOS support"
-	depends on PM && PM_LEGACY
+	depends on PM
...

This doesn't compile:

<-- snip -->

...
CC arch/i386/kernel/apm.o
arch/i386/kernel/apm.c: In function 'apm_init':
arch/i386/kernel/apm.c:2304: error: 'pm_active' undeclared (first use in this function) arch/i386/kernel/apm.c:2304: error: (Each undeclared identifier is reported only once arch/i386/kernel/apm.c:2304: error: for each function it appears in.) arch/i386/kernel/apm.c: In function 'apm_exit':
arch/i386/kernel/apm.c:2410: error: 'pm_active' undeclared (first use in this function) make[1]: *** [arch/i386/kernel/apm.o] Error 1

Quoted 4 lines

<-- snip -->

If PM_LEGACY causes user confusion for APM users, commit bca73e4bf8563d83f7856164caa44d5f42e44cca should be reverted.

Yeah, I realised that earlier too, my change was untested.

Hrmph. For now I've enabled PM_LEGACY, but silently taking options away like this is what surprises users.

Dave

author
#3 lore raw
Quoted 11 lines · Dave Jones
Quoted 11 lines

CC arch/i386/kernel/apm.o
arch/i386/kernel/apm.c: In function 'apm_init':
arch/i386/kernel/apm.c:2304: error: 'pm_active' undeclared (first use in this function) arch/i386/kernel/apm.c:2304: error: (Each undeclared identifier is reported only once arch/i386/kernel/apm.c:2304: error: for each function it appears in.) arch/i386/kernel/apm.c: In function 'apm_exit':
arch/i386/kernel/apm.c:2410: error: 'pm_active' undeclared (first use in this function) make[1]: *** [arch/i386/kernel/apm.o] Error 1

<-- snip -->

Quoted 7 lines
Quoted 2 lines

If PM_LEGACY causes user confusion for APM users, commit bca73e4bf8563d83f7856164caa44d5f42e44cca should be reverted.

Yeah, I realised that earlier too, my change was untested.

Hrmph. For now I've enabled PM_LEGACY, but silently taking options away like this is what surprises users.

Living dangerously with another not-compile-tested patch. (It's building right now, but I'm about to go eat, and
with my goldfish like attention span, I'll forget about it later)

The ifdef's are a bit ugly, but given it's a legacy interface, maybe pm_active & co will all go away completely one day.

arch/i386/Kconfig renamed from arch/i386/Kconfig~ +1 -1
@@ -710,7 +710,7 @@ depends on PM && !X86_VISWS
 
 config APM
 	tristate "APM (Advanced Power Management) BIOS support"
-	depends on PM && PM_LEGACY
+	depends on PM
 	---help---
 	  APM is a BIOS specification for saving power using several different
 	  techniques. This is mostly useful for battery powered laptops with
arch/i386/kernel/apm.c renamed from arch/i386/kernel/apm.c~ +4 -0
@@ -2301,7 +2301,9 @@ static int __init apm_init(void)
 		apm_info.disabled = 1;
 		return -ENODEV;
 	}
+#ifdef CONFIG_PM_LEGACY
 	pm_active = 1;
+#endif
 
 	/*
 	 * Set up a segment that references the real mode segment 0x40
@@ -2407,7 +2409,9 @@ static void __exit apm_exit(void)
 	exit_kapmd = 1;
 	while (kapmd_running)
 		schedule();
+#ifdef CONFIG_PM_LEGACY
 	pm_active = 0;
+#endif
 }
 
 module_init(apm_init);