提交 a6b68076 编写于 作者: A Andi Kleen 提交者: Ingo Molnar

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 <sfr@canb.auug.org.au>: build dependency fix ]
Signed-off-by: NAndi Kleen <ak@suse.de>
Signed-off-by: NIngo Molnar <mingo@elte.hu>
Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
上级 37f30e21
......@@ -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
......
......@@ -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.
......
......@@ -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
......@@ -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 */
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册