Commit 98db6f19 authored by Sam Ravnborg's avatar Sam Ravnborg Committed by Jesse Barnes

x86: fix section mismatch in pci_scan_bus

Fix following section mismatch warning:
WARNING: vmlinux.o(.text+0x275616): Section mismatch in reference from the function pci_scan_bus() to the function .devinit.text:pci_scan_bus_parented()

The warning was seen with a CONFIG_DEBUG_SECTION_MISMATCH=y build.
The inline function pci_scan_bus refer to functions annotated
__devinit - so annotate it __devinit too.
This revealed a few x86 specific functions that were only
used from __init or __devinit context.
So annotate these __devinit and the warning was killed.

The added include in pci.h was not strictly required but
added to avoid being dependent on indirect includes.
Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
Signed-off-by: default avatarJesse Barnes <jbarnes@hobbes.lan>
parent 7663c1e2
...@@ -489,7 +489,7 @@ void pcibios_disable_device (struct pci_dev *dev) ...@@ -489,7 +489,7 @@ void pcibios_disable_device (struct pci_dev *dev)
pcibios_disable_irq(dev); pcibios_disable_irq(dev);
} }
struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) struct pci_bus * __devinit pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
{ {
struct pci_bus *bus = NULL; struct pci_bus *bus = NULL;
struct pci_sysdata *sd; struct pci_sysdata *sd;
...@@ -512,7 +512,7 @@ struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node) ...@@ -512,7 +512,7 @@ struct pci_bus *pci_scan_bus_on_node(int busno, struct pci_ops *ops, int node)
return bus; return bus;
} }
struct pci_bus *pci_scan_bus_with_sysdata(int busno) struct pci_bus * __devinit pci_scan_bus_with_sysdata(int busno)
{ {
return pci_scan_bus_on_node(busno, &pci_root_ops, -1); return pci_scan_bus_on_node(busno, &pci_root_ops, -1);
} }
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
#include <linux/mod_devicetable.h> #include <linux/mod_devicetable.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/init.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/compiler.h> #include <linux/compiler.h>
...@@ -474,7 +475,7 @@ extern struct pci_bus *pci_find_bus(int domain, int busnr); ...@@ -474,7 +475,7 @@ extern struct pci_bus *pci_find_bus(int domain, int busnr);
void pci_bus_add_devices(struct pci_bus *bus); void pci_bus_add_devices(struct pci_bus *bus);
struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus, struct pci_bus *pci_scan_bus_parented(struct device *parent, int bus,
struct pci_ops *ops, void *sysdata); struct pci_ops *ops, void *sysdata);
static inline struct pci_bus *pci_scan_bus(int bus, struct pci_ops *ops, static inline struct pci_bus * __devinit pci_scan_bus(int bus, struct pci_ops *ops,
void *sysdata) void *sysdata)
{ {
struct pci_bus *root_bus; struct pci_bus *root_bus;
......
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