x86: ce4100: Set pci ops via callback instead of module init

Setting the pci ops on subsys initcall unconditionally will break
multi platform kernels on anything except ce4100.

Use x86_init.pci.init ops to call this only on real ce4100 platforms.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: sodaville@linutronix.de
LKML-Reference: <20110314093340.GA21026@www.tglx.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

authored by Sebastian Andrzej Siewior and committed by Thomas Gleixner 03150171 a79e53d8

Changed files
+12 -3
arch
x86
include
asm
pci
platform
ce4100
+6
arch/x86/include/asm/ce4100.h
··· 1 + #ifndef _ASM_CE4100_H_ 2 + #define _ASM_CE4100_H_ 3 + 4 + int ce4100_pci_init(void); 5 + 6 + #endif
+4 -3
arch/x86/pci/ce4100.c
··· 34 34 #include <linux/pci.h> 35 35 #include <linux/init.h> 36 36 37 + #include <asm/ce4100.h> 37 38 #include <asm/pci_x86.h> 38 39 39 40 struct sim_reg { ··· 307 306 .write = ce4100_conf_write, 308 307 }; 309 308 310 - static int __init ce4100_pci_init(void) 309 + int __init ce4100_pci_init(void) 311 310 { 312 311 init_sim_regs(); 313 312 raw_pci_ops = &ce4100_pci_conf; 314 - return 0; 313 + /* Indicate caller that it should invoke pci_legacy_init() */ 314 + return 1; 315 315 } 316 - subsys_initcall(ce4100_pci_init);
+2
arch/x86/platform/ce4100/ce4100.c
··· 15 15 #include <linux/serial_reg.h> 16 16 #include <linux/serial_8250.h> 17 17 18 + #include <asm/ce4100.h> 18 19 #include <asm/setup.h> 19 20 #include <asm/io.h> 20 21 ··· 130 129 x86_init.resources.probe_roms = x86_init_noop; 131 130 x86_init.mpparse.get_smp_config = x86_init_uint_noop; 132 131 x86_init.mpparse.find_smp_config = sdv_find_smp_config; 132 + x86_init.pci.init = ce4100_pci_init; 133 133 }