public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Make apm buildable without legacy pm.
@ 2006-01-03 14:33 Dave Jones
  2006-01-05  1:41 ` Kurt Wall
  0 siblings, 1 reply; 3+ messages in thread
From: Dave Jones @ 2006-01-03 14:33 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm

APM doesn't _need_ the PM_LEGACY junk, so remove it's dependancy
from Kconfig, and ifdef the junk in the code.
Whilst the ifdefs are ugly, when the legacy stuff gets ripped out
so will the ifdefs.

Signed-off-by: Dave Jones <davej@redhat.com>

--- linux-2.6.14/arch/i386/Kconfig~	2005-12-22 22:06:10.000000000 -0500
+++ linux-2.6.14/arch/i386/Kconfig	2005-12-22 22:06:16.000000000 -0500
@@ -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
--- linux-2.6.14/arch/i386/kernel/apm.c~	2005-12-22 21:53:43.000000000 -0500
+++ linux-2.6.14/arch/i386/kernel/apm.c	2005-12-22 21:54:02.000000000 -0500
@@ -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);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Make apm buildable without legacy pm.
  2006-01-03 14:33 Make apm buildable without legacy pm Dave Jones
@ 2006-01-05  1:41 ` Kurt Wall
  2006-01-05 17:22   ` Adrian Bunk
  0 siblings, 1 reply; 3+ messages in thread
From: Kurt Wall @ 2006-01-05  1:41 UTC (permalink / raw)
  To: Dave Jones, linux-kernel, akpm

On Tue, Jan 03, 2006 at 09:33:52AM -0500, Dave Jones took 0 lines to write:
> APM doesn't _need_ the PM_LEGACY junk, so remove it's dependancy
> from Kconfig, and ifdef the junk in the code.
> Whilst the ifdefs are ugly, when the legacy stuff gets ripped out
> so will the ifdefs.
> 
> Signed-off-by: Dave Jones <davej@redhat.com>
> 
> --- linux-2.6.14/arch/i386/Kconfig~	2005-12-22 22:06:10.000000000 -0500
> +++ linux-2.6.14/arch/i386/Kconfig	2005-12-22 22:06:16.000000000 -0500
> @@ -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

Here's this hunk re-diffed against 2.6.15 (which applies without
needing patch to apply an offset of -11 lines):

--- linux-2.6.15/arch/i386/Kconfig.orig	2006-01-04 20:33:43.000000000 -0500
+++ linux-2.6.15/arch/i386/Kconfig	2006-01-04 20:35:34.000000000 -0500
@@ -699,7 +699,7 @@
 
 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

Kurt
-- 
If I traveled to the end of the rainbow
As Dame Fortune did intend,
Murphy would be there to tell me
The pot's at the other end.
		-- Bert Whitney

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Make apm buildable without legacy pm.
  2006-01-05  1:41 ` Kurt Wall
@ 2006-01-05 17:22   ` Adrian Bunk
  0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2006-01-05 17:22 UTC (permalink / raw)
  To: Dave Jones, linux-kernel, akpm

On Wed, Jan 04, 2006 at 08:41:26PM -0500, Kurt Wall wrote:
> On Tue, Jan 03, 2006 at 09:33:52AM -0500, Dave Jones took 0 lines to write:
> > APM doesn't _need_ the PM_LEGACY junk, so remove it's dependancy
> > from Kconfig, and ifdef the junk in the code.
> > Whilst the ifdefs are ugly, when the legacy stuff gets ripped out
> > so will the ifdefs.
> > 
> > Signed-off-by: Dave Jones <davej@redhat.com>
> > 
> > --- linux-2.6.14/arch/i386/Kconfig~	2005-12-22 22:06:10.000000000 -0500
> > +++ linux-2.6.14/arch/i386/Kconfig	2005-12-22 22:06:16.000000000 -0500
> > @@ -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
> 
> Here's this hunk re-diffed against 2.6.15 (which applies without
> needing patch to apply an offset of -11 lines):
>...

Offsets when applying patches are usually completely harmless (problems 
are only possible if there isn't enough context, but that's obviously 
not the case here).

> Kurt

cu
Adrian

-- 

       "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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-05 17:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-03 14:33 Make apm buildable without legacy pm Dave Jones
2006-01-05  1:41 ` Kurt Wall
2006-01-05 17:22   ` Adrian Bunk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox