]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
PCI: fix section mismatch warning in pci_scan_child_bus
authorSam Ravnborg <sam@ravnborg.org>
Sun, 17 Feb 2008 09:45:28 +0000 (10:45 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 4 Mar 2008 23:07:03 +0000 (15:07 -0800)
Fix following warning:
WARNING: vmlinux.o(.text+0x47bdb1): Section mismatch in reference from the function pci_scan_child_bus() to the function .devinit.text:pcibios_fixup_bus()

We had plenty of functions that could be annotated __devinit but due to
the former restriction that exported symbols could not be annotated
they were not so.  So annotate these function and fix the references
from the pci/hotplug/* code to silence the resuting warnings.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/hotplug-pci.c
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/cpci_hotplug_pci.c
drivers/pci/hotplug/pciehp_pci.c
drivers/pci/hotplug/shpchp_pci.c
drivers/pci/probe.c

index a590ef682153ee5d765af348640ce79d39a9d4e8..4d4a64478404650a9640c852b3cf708937fc5ff0 100644 (file)
@@ -4,7 +4,7 @@
 #include "pci.h"
 
 
-unsigned int pci_do_scan_bus(struct pci_bus *bus)
+unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus)
 {
        unsigned int max;
 
index cf22f9e01e005721257bd61c7a2894008f65b497..5e50008d1181046ea2b77378f68c4fd7596c1914 100644 (file)
@@ -1085,7 +1085,7 @@ static int acpiphp_bus_trim(acpi_handle handle)
  * This function should be called per *physical slot*,
  * not per each slot object in ACPI namespace.
  */
-static int enable_device(struct acpiphp_slot *slot)
+static int __ref enable_device(struct acpiphp_slot *slot)
 {
        struct pci_dev *dev;
        struct pci_bus *bus = slot->bridge->pci_bus;
index 5e9be44817cb5ff4daa3f8bc5b04f6f45f10e6d3..b3515fc4cd38383fd2a25860b346b514006c3c52 100644 (file)
@@ -250,7 +250,7 @@ int cpci_led_off(struct slot* slot)
  * Device configuration functions
  */
 
-int cpci_configure_slot(struct slot* slot)
+int __ref cpci_configure_slot(struct slot *slot)
 {
        struct pci_bus *parent;
        int fn;
index dd50713966d1b011bc480aa9d2cab642c63bb7c9..9372a840b63dbd3d43147dca446c3f078455a2e5 100644 (file)
@@ -167,7 +167,7 @@ static void program_fw_provided_values(struct pci_dev *dev)
        }
 }
 
-static int pciehp_add_bridge(struct pci_dev *dev)
+static int __ref pciehp_add_bridge(struct pci_dev *dev)
 {
        struct pci_bus *parent = dev->bus;
        int pass, busnr, start = parent->secondary;
index 0a6b25ef194c2991e36d3be4e2bb605b61a4bed4..a69a21520895814caf732ab93735b9a950688c60 100644 (file)
@@ -96,7 +96,7 @@ static void program_fw_provided_values(struct pci_dev *dev)
        }
 }
 
-int shpchp_configure_device(struct slot *p_slot)
+int __ref shpchp_configure_device(struct slot *p_slot)
 {
        struct pci_dev *dev;
        struct pci_bus *parent = p_slot->ctrl->pci_dev->subordinate;
index 4d23b9fb551bc129239f07404e04f6a4102ae092..2db2e4bb0d1ed6073b6ec9d3e0dec604868974ab 100644 (file)
@@ -286,7 +286,7 @@ static void pci_read_bases(struct pci_dev *dev, unsigned int howmany, int rom)
        }
 }
 
-void pci_read_bridge_bases(struct pci_bus *child)
+void __devinit pci_read_bridge_bases(struct pci_bus *child)
 {
        struct pci_dev *dev = child->self;
        u8 io_base_lo, io_limit_lo;
@@ -472,7 +472,7 @@ static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max)
  * them, we proceed to assigning numbers to the remaining buses in
  * order to avoid overlaps between old and new bus numbers.
  */
-int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass)
+int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max, int pass)
 {
        struct pci_bus *child;
        int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS);
@@ -1008,7 +1008,7 @@ int pci_scan_slot(struct pci_bus *bus, int devfn)
        return nr;
 }
 
-unsigned int pci_scan_child_bus(struct pci_bus *bus)
+unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus)
 {
        unsigned int devfn, pass, max = bus->secondary;
        struct pci_dev *dev;
@@ -1116,7 +1116,7 @@ err_out:
        return NULL;
 }
 
-struct pci_bus *pci_scan_bus_parented(struct device *parent,
+struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent,
                int bus, struct pci_ops *ops, void *sysdata)
 {
        struct pci_bus *b;