Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

PCI: annotate pci_rescan_bus as __ref, not __devinit

pci_rescan_bus was annotated as __devinit, which is wrong,
because it will never be part of device initialization.
Howevever, we can't simply drop the annotation, because then we
get section warnings about calling pci_scan_child_bus (which is
correctly marked as __devinit).

pci_rescan_bus will only get built when CONFIG_HOTPLUG is set,
meaning that __devinit is a nop, so we know that pci_scan_child_bus
has not been freed.

Annotate as __ref to silence modpost.

Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

authored by

Alex Chiang and committed by
Jesse Barnes
5446a6bd 52a8873b

+1 -1
+1 -1
drivers/pci/probe.c
··· 1220 1220 * 1221 1221 * Returns the max number of subordinate bus discovered. 1222 1222 */ 1223 - unsigned int __devinit pci_rescan_bus(struct pci_bus *bus) 1223 + unsigned int __ref pci_rescan_bus(struct pci_bus *bus) 1224 1224 { 1225 1225 unsigned int max; 1226 1226 struct pci_dev *dev;