]> xenbits.xensource.com Git - people/royger/linux-2.6.18-xen.git/commitdiff
pci/iomulti: adjustments for CONFIG_HOTPLUG_PCI=m
authorKeir Fraser <keir.fraser@citrix.com>
Fri, 9 Jul 2010 11:37:02 +0000 (12:37 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Fri, 9 Jul 2010 11:37:02 +0000 (12:37 +0100)
The code supposed to deal with hot added/removed devices is also
needed when the core PCI hotplug code lives in a module.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
drivers/pci/iomulti.c

index 34729fb7d644884781d21c503d463f2d8463e86a..f14aff7da143d4e45f10600a8b5a432c4e07a662 100644 (file)
@@ -245,7 +245,7 @@ static void pci_iomul_switch_add_locked(struct pci_iomul_switch *sw)
        list_add(&sw->list, &switch_list);
 }
 
-#ifdef CONFIG_HOTPLUG_PCI
+#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
 static void pci_iomul_switch_del_locked(struct pci_iomul_switch *sw)
 {
        BUG_ON(!mutex_is_locked(&switch_list_lock));
@@ -337,7 +337,7 @@ static void pci_iomul_slot_add_locked(struct pci_iomul_switch *sw,
        list_add(&slot->sibling, &sw->slots);
 }
 
-#ifdef CONFIG_HOTPLUG_PCI
+#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
 static void pci_iomul_slot_del_locked(struct pci_iomul_switch *sw,
                                       struct pci_iomul_slot *slot)
 {
@@ -895,7 +895,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_ANY_ID, PCI_ANY_ID,
                        quirk_iomul_reassign_ioresource);
 
 /*****************************************************************************/
-#ifdef CONFIG_HOTPLUG_PCI
+#if defined(CONFIG_HOTPLUG_PCI) || defined(CONFIG_HOTPLUG_PCI_MODULE)
 static int __devinit __pci_iomul_notifier_del_device(struct pci_dev *pdev)
 {
        struct pci_iomul_switch *sw;
@@ -990,7 +990,7 @@ static int __devinit pci_iomul_notifier(struct notifier_block *nb,
        return 0;
 }
 
-static struct notifier_block pci_iomul_nb = {
+static struct notifier_block __devinitdata pci_iomul_nb = {
         .notifier_call = pci_iomul_notifier,
 };
 
@@ -1383,7 +1383,7 @@ static struct miscdevice pci_iomul_miscdev = {
        .fops = &pci_iomul_fops,
 };
 
-static int pci_iomul_init(void)
+static int __init pci_iomul_init(void)
 {
        int error;
        error = misc_register(&pci_iomul_miscdev);