ChangeSet 1.1608.97.1, 2004/03/10 14:22:31-08:00, schwab@suse.de [PATCH] PCI Hotplug: Fix PCIE and SHPC hotplug drivers for ia64 This patch fixes the PCIE and SHPC hotplug driver for ia64. The function pcibios_set_irq_routing only exists on x86, and acpi_bridges_head may be NULL, so don't crash. Andreas. drivers/pci/hotplug/pciehp_pci.c | 2 +- drivers/pci/hotplug/pciehprm_acpi.c | 3 ++- drivers/pci/hotplug/shpchp_pci.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff -Nru a/drivers/pci/hotplug/pciehp_pci.c b/drivers/pci/hotplug/pciehp_pci.c --- a/drivers/pci/hotplug/pciehp_pci.c Fri Mar 19 15:21:36 2004 +++ b/drivers/pci/hotplug/pciehp_pci.c Fri Mar 19 15:21:36 2004 @@ -103,7 +103,7 @@ */ int pciehp_set_irq (u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num) { -#if !defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_64) +#if defined(CONFIG_X86) && !defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_64) int rc; u16 temp_word; struct pci_dev fakedev; diff -Nru a/drivers/pci/hotplug/pciehprm_acpi.c b/drivers/pci/hotplug/pciehprm_acpi.c --- a/drivers/pci/hotplug/pciehprm_acpi.c Fri Mar 19 15:21:36 2004 +++ b/drivers/pci/hotplug/pciehprm_acpi.c Fri Mar 19 15:21:36 2004 @@ -1268,7 +1268,8 @@ int pciehprm_print_pirt(void) { dbg("PCIEHPRM ACPI Slots\n"); - print_acpi_resources (acpi_bridges_head); + if (acpi_bridges_head) + print_acpi_resources (acpi_bridges_head); return 0; } diff -Nru a/drivers/pci/hotplug/shpchp_pci.c b/drivers/pci/hotplug/shpchp_pci.c --- a/drivers/pci/hotplug/shpchp_pci.c Fri Mar 19 15:21:36 2004 +++ b/drivers/pci/hotplug/shpchp_pci.c Fri Mar 19 15:21:36 2004 @@ -101,7 +101,7 @@ */ int shpchp_set_irq (u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num) { -#if !defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_64) +#if defined(CONFIG_X86) && !defined(CONFIG_X86_IO_APIC) && !defined(CONFIG_X86_64) int rc; u16 temp_word; struct pci_dev fakedev;