Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a6b68076fd5d7de04e6847ed9d7d212e7dd6beb5
Commit:     a6b68076fd5d7de04e6847ed9d7d212e7dd6beb5
Parent:     37f30e21d6be046e948fce1dfa4a968cf5abcf89
Author:     Andi Kleen <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:32:49 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:32:49 2008 +0100

    x86: compile apm and voyager module only when selected in Kconfig
    
    Previously the complete files were #ifdef'ed, but now handle that in the
    Makefile.
    
    May save a minor bit of compilation time.
    
    [ Stephen Rothwell <[EMAIL PROTECTED]>: build dependency fix ]
    Signed-off-by: Andi Kleen <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 arch/x86/Kconfig        |    5 +++++
 arch/x86/boot/Makefile  |    6 ++++--
 arch/x86/boot/apm.c     |    3 ---
 arch/x86/boot/voyager.c |    4 ----
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 5271665..1de28e8 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1199,6 +1199,11 @@ source "kernel/power/Kconfig"
 
 source "drivers/acpi/Kconfig"
 
+config X86_APM_BOOT
+       bool
+       default y
+       depends on APM || APM_MODULE
+
 menuconfig APM
        tristate "APM (Advanced Power Management) BIOS support"
        depends on X86_32 && PM_SLEEP && !X86_VISWS
diff --git a/arch/x86/boot/Makefile b/arch/x86/boot/Makefile
index dcad650..349b81a 100644
--- a/arch/x86/boot/Makefile
+++ b/arch/x86/boot/Makefile
@@ -28,9 +28,11 @@ SVGA_MODE := -DSVGA_MODE=NORMAL_VGA
 targets                := vmlinux.bin setup.bin setup.elf zImage bzImage
 subdir-        := compressed
 
-setup-y                += a20.o apm.o cmdline.o copy.o cpu.o cpucheck.o edd.o
+setup-y                += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o
 setup-y                += header.o main.o mca.o memory.o pm.o pmjump.o
-setup-y                += printf.o string.o tty.o video.o version.o voyager.o
+setup-y                += printf.o string.o tty.o video.o version.o
+setup-$(CONFIG_X86_APM_BOOT) += apm.o
+setup-$(CONFIG_X86_VOYAGER) += voyager.o
 
 # The link order of the video-*.o modules can matter.  In particular,
 # video-vga.o *must* be listed first, followed by video-vesa.o.
diff --git a/arch/x86/boot/apm.c b/arch/x86/boot/apm.c
index eab50c5..c117c7f 100644
--- a/arch/x86/boot/apm.c
+++ b/arch/x86/boot/apm.c
@@ -19,8 +19,6 @@
 
 #include "boot.h"
 
-#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
-
 int query_apm_bios(void)
 {
        u16 ax, bx, cx, dx, di;
@@ -95,4 +93,3 @@ int query_apm_bios(void)
        return 0;
 }
 
-#endif
diff --git a/arch/x86/boot/voyager.c b/arch/x86/boot/voyager.c
index 61c8fe0..6499e32 100644
--- a/arch/x86/boot/voyager.c
+++ b/arch/x86/boot/voyager.c
@@ -16,8 +16,6 @@
 
 #include "boot.h"
 
-#ifdef CONFIG_X86_VOYAGER
-
 int query_voyager(void)
 {
        u8 err;
@@ -42,5 +40,3 @@ int query_voyager(void)
        copy_from_fs(data_ptr, di, 7);  /* Table is 7 bytes apparently */
        return 0;
 }
-
-#endif /* CONFIG_X86_VOYAGER */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to