Commit 19952652 authored by Andreas Schwab's avatar Andreas Schwab Committed by Greg Kroah-Hartman

[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.
parent 4eedca38
......@@ -103,7 +103,7 @@ int pciehp_unconfigure_device(struct pci_func* func)
*/
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;
......
......@@ -1268,7 +1268,8 @@ static int print_acpi_resources (struct acpi_bridge *ab)
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;
}
......
......@@ -101,7 +101,7 @@ int shpchp_unconfigure_device(struct pci_func* func)
*/
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment