Commit a6b68076fd5d7de04e6847ed9d7d212e7dd6beb5
Committed by
Ingo Molnar
1 parent
37f30e21d6
Exists in
master
and in
20 other branches
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: Andi Kleen <ak@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Showing 4 changed files with 9 additions and 9 deletions Side-by-side Diff
arch/x86/Kconfig
... | ... | @@ -1199,6 +1199,11 @@ |
1199 | 1199 | |
1200 | 1200 | source "drivers/acpi/Kconfig" |
1201 | 1201 | |
1202 | +config X86_APM_BOOT | |
1203 | + bool | |
1204 | + default y | |
1205 | + depends on APM || APM_MODULE | |
1206 | + | |
1202 | 1207 | menuconfig APM |
1203 | 1208 | tristate "APM (Advanced Power Management) BIOS support" |
1204 | 1209 | depends on X86_32 && PM_SLEEP && !X86_VISWS |
arch/x86/boot/Makefile
... | ... | @@ -28,9 +28,11 @@ |
28 | 28 | targets := vmlinux.bin setup.bin setup.elf zImage bzImage |
29 | 29 | subdir- := compressed |
30 | 30 | |
31 | -setup-y += a20.o apm.o cmdline.o copy.o cpu.o cpucheck.o edd.o | |
31 | +setup-y += a20.o cmdline.o copy.o cpu.o cpucheck.o edd.o | |
32 | 32 | setup-y += header.o main.o mca.o memory.o pm.o pmjump.o |
33 | -setup-y += printf.o string.o tty.o video.o version.o voyager.o | |
33 | +setup-y += printf.o string.o tty.o video.o version.o | |
34 | +setup-$(CONFIG_X86_APM_BOOT) += apm.o | |
35 | +setup-$(CONFIG_X86_VOYAGER) += voyager.o | |
34 | 36 | |
35 | 37 | # The link order of the video-*.o modules can matter. In particular, |
36 | 38 | # video-vga.o *must* be listed first, followed by video-vesa.o. |
arch/x86/boot/apm.c
... | ... | @@ -19,8 +19,6 @@ |
19 | 19 | |
20 | 20 | #include "boot.h" |
21 | 21 | |
22 | -#if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE) | |
23 | - | |
24 | 22 | int query_apm_bios(void) |
25 | 23 | { |
26 | 24 | u16 ax, bx, cx, dx, di; |
... | ... | @@ -94,6 +92,4 @@ |
94 | 92 | boot_params.apm_bios_info.flags = cx; |
95 | 93 | return 0; |
96 | 94 | } |
97 | - | |
98 | -#endif |
arch/x86/boot/voyager.c
... | ... | @@ -16,8 +16,6 @@ |
16 | 16 | |
17 | 17 | #include "boot.h" |
18 | 18 | |
19 | -#ifdef CONFIG_X86_VOYAGER | |
20 | - | |
21 | 19 | int query_voyager(void) |
22 | 20 | { |
23 | 21 | u8 err; |
... | ... | @@ -42,6 +40,4 @@ |
42 | 40 | copy_from_fs(data_ptr, di, 7); /* Table is 7 bytes apparently */ |
43 | 41 | return 0; |
44 | 42 | } |
45 | - | |
46 | -#endif /* CONFIG_X86_VOYAGER */ |