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

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