summaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/olpc.c
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@queued.net>2008-06-05 23:14:41 +0200
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-06-05 23:29:25 +0200
commit2bdd1b031b200d55c2512c8d7e0e9bdcf85d011f (patch)
tree519d34fdd9f286c933ab7d747b6ef92f0a3842fe /arch/x86/pci/olpc.c
parentLinux 2.6.26-rc5 (diff)
downloadlinux-2bdd1b031b200d55c2512c8d7e0e9bdcf85d011f.tar.xz
linux-2bdd1b031b200d55c2512c8d7e0e9bdcf85d011f.zip
PCI/x86: fix up PCI stuff so that PCI_GOANY supports OLPC
Previously, one would have to specifically choose CONFIG_OLPC and CONFIG_PCI_GOOLPC in order to enable PCI_OLPC. That doesn't really work for distro kernels, so this patch allows one to choose CONFIG_OLPC and CONFIG_PCI_GOANY in order to build in OLPC support in a generic kernel (as requested by Robert Millan). This also moves GOOLPC before GOANY in the menuconfig list. Finally, make pci_access_init return early if we detect OLPC hardware. There's no need to continue probing stuff, and pci_pcbios_init specifically trashes our settings (we didn't run into that before because PCI_GOANY wasn't supported). Signed-off-by: Andres Salomon <dilinger@debian.org> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/x86/pci/olpc.c')
-rw-r--r--arch/x86/pci/olpc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/pci/olpc.c b/arch/x86/pci/olpc.c
index 5e7636558c02..e11e9e803d5f 100644
--- a/arch/x86/pci/olpc.c
+++ b/arch/x86/pci/olpc.c
@@ -302,12 +302,13 @@ static struct pci_raw_ops pci_olpc_conf = {
.write = pci_olpc_write,
};
-void __init pci_olpc_init(void)
+int __init pci_olpc_init(void)
{
if (!machine_is_olpc() || olpc_has_vsa())
- return;
+ return -ENODEV;
printk(KERN_INFO "PCI: Using configuration type OLPC\n");
raw_pci_ops = &pci_olpc_conf;
is_lx = is_geode_lx();
+ return 0;
}