diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2007-03-27 01:53:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-05-02 22:02:35 -0400 |
commit | 96bde06a2df1b363206d3cdef53134b84ff37813 (patch) | |
tree | 4d3cc2c8c73a0534bc65e56ff1dec39eaa823b4c /drivers/pci/probe.c | |
parent | 6ba186361ed2cda7e174856a3ab8a8e3237b3c3d (diff) |
pci: do not mark exported functions as __devinit
Functions marked __devinit will be removed after kernel init. But being
exported they are potentially called by a module much later.
So the safer choice seems to be to keep the function even in the non
CONFIG_HOTPLUG case.
This silence the follwoing section mismatch warnings:
WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_device from __ksymtab_gpl between '__ksymtab_pci_bus_add_device' (at offset 0x20) and '__ksymtab_pci_walk_bus'
WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_create_bus from __ksymtab_gpl between '__ksymtab_pci_create_bus' (at offset 0x40) and '__ksymtab_pci_stop_bus_device'
WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_max_busnr from __ksymtab_gpl between '__ksymtab_pci_bus_max_busnr' (at offset 0xc0) and '__ksymtab_pci_assign_resource_fixed'
WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_claim_resource from __ksymtab_gpl between '__ksymtab_pci_claim_resource' (at offset 0xe0) and '__ksymtab_pcie_port_bus_type'
WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_add_devices from __ksymtab between '__ksymtab_pci_bus_add_devices' (at offset 0x70) and '__ksymtab_pci_bus_alloc_resource'
WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_scan_bus_parented from __ksymtab between '__ksymtab_pci_scan_bus_parented' (at offset 0x90) and '__ksymtab_pci_root_buses'
WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_assign_resources from __ksymtab between '__ksymtab_pci_bus_assign_resources' (at offset 0x4d0) and '__ksymtab_pci_bus_size_bridges'
WARNING: drivers/built-in.o - Section mismatch: reference to .init.text:pci_bus_size_bridges from __ksymtab between '__ksymtab_pci_bus_size_bridges' (at offset 0x4e0) and '__ksymtab_pci_setup_cardbus'
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r-- | drivers/pci/probe.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 2fe1d690eb13..629edf39a07d 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -364,7 +364,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
364 | } | 364 | } |
365 | } | 365 | } |
366 | 366 | ||
367 | static struct pci_bus * __devinit pci_alloc_bus(void) | 367 | static struct pci_bus * pci_alloc_bus(void) |
368 | { | 368 | { |
369 | struct pci_bus *b; | 369 | struct pci_bus *b; |
370 | 370 | ||
@@ -432,7 +432,7 @@ error_register: | |||
432 | return NULL; | 432 | return NULL; |
433 | } | 433 | } |
434 | 434 | ||
435 | struct pci_bus * __devinit pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) | 435 | struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int busnr) |
436 | { | 436 | { |
437 | struct pci_bus *child; | 437 | struct pci_bus *child; |
438 | 438 | ||
@@ -461,7 +461,7 @@ static void pci_enable_crs(struct pci_dev *dev) | |||
461 | pci_write_config_word(dev, rpcap + PCI_EXP_RTCTL, rpctl); | 461 | pci_write_config_word(dev, rpcap + PCI_EXP_RTCTL, rpctl); |
462 | } | 462 | } |
463 | 463 | ||
464 | static void __devinit pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max) | 464 | static void pci_fixup_parent_subordinate_busnr(struct pci_bus *child, int max) |
465 | { | 465 | { |
466 | struct pci_bus *parent = child->parent; | 466 | struct pci_bus *parent = child->parent; |
467 | 467 | ||
@@ -477,7 +477,7 @@ static void __devinit pci_fixup_parent_subordinate_busnr(struct pci_bus *child, | |||
477 | } | 477 | } |
478 | } | 478 | } |
479 | 479 | ||
480 | unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus); | 480 | unsigned int pci_scan_child_bus(struct pci_bus *bus); |
481 | 481 | ||
482 | /* | 482 | /* |
483 | * If it's a bridge, configure it and scan the bus behind it. | 483 | * If it's a bridge, configure it and scan the bus behind it. |
@@ -489,7 +489,7 @@ unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus); | |||
489 | * them, we proceed to assigning numbers to the remaining buses in | 489 | * them, we proceed to assigning numbers to the remaining buses in |
490 | * order to avoid overlaps between old and new bus numbers. | 490 | * order to avoid overlaps between old and new bus numbers. |
491 | */ | 491 | */ |
492 | int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass) | 492 | int pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max, int pass) |
493 | { | 493 | { |
494 | struct pci_bus *child; | 494 | struct pci_bus *child; |
495 | int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS); | 495 | int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS); |
@@ -912,7 +912,7 @@ pci_scan_device(struct pci_bus *bus, int devfn) | |||
912 | return dev; | 912 | return dev; |
913 | } | 913 | } |
914 | 914 | ||
915 | void __devinit pci_device_add(struct pci_dev *dev, struct pci_bus *bus) | 915 | void pci_device_add(struct pci_dev *dev, struct pci_bus *bus) |
916 | { | 916 | { |
917 | device_initialize(&dev->dev); | 917 | device_initialize(&dev->dev); |
918 | dev->dev.release = pci_release_dev; | 918 | dev->dev.release = pci_release_dev; |
@@ -935,8 +935,7 @@ void __devinit pci_device_add(struct pci_dev *dev, struct pci_bus *bus) | |||
935 | up_write(&pci_bus_sem); | 935 | up_write(&pci_bus_sem); |
936 | } | 936 | } |
937 | 937 | ||
938 | struct pci_dev * __devinit | 938 | struct pci_dev *pci_scan_single_device(struct pci_bus *bus, int devfn) |
939 | pci_scan_single_device(struct pci_bus *bus, int devfn) | ||
940 | { | 939 | { |
941 | struct pci_dev *dev; | 940 | struct pci_dev *dev; |
942 | 941 | ||
@@ -958,7 +957,7 @@ pci_scan_single_device(struct pci_bus *bus, int devfn) | |||
958 | * discovered devices to the @bus->devices list. New devices | 957 | * discovered devices to the @bus->devices list. New devices |
959 | * will have an empty dev->global_list head. | 958 | * will have an empty dev->global_list head. |
960 | */ | 959 | */ |
961 | int __devinit pci_scan_slot(struct pci_bus *bus, int devfn) | 960 | int pci_scan_slot(struct pci_bus *bus, int devfn) |
962 | { | 961 | { |
963 | int func, nr = 0; | 962 | int func, nr = 0; |
964 | int scan_all_fns; | 963 | int scan_all_fns; |
@@ -991,7 +990,7 @@ int __devinit pci_scan_slot(struct pci_bus *bus, int devfn) | |||
991 | return nr; | 990 | return nr; |
992 | } | 991 | } |
993 | 992 | ||
994 | unsigned int __devinit pci_scan_child_bus(struct pci_bus *bus) | 993 | unsigned int pci_scan_child_bus(struct pci_bus *bus) |
995 | { | 994 | { |
996 | unsigned int devfn, pass, max = bus->secondary; | 995 | unsigned int devfn, pass, max = bus->secondary; |
997 | struct pci_dev *dev; | 996 | struct pci_dev *dev; |
@@ -1041,7 +1040,7 @@ unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus) | |||
1041 | return max; | 1040 | return max; |
1042 | } | 1041 | } |
1043 | 1042 | ||
1044 | struct pci_bus * __devinit pci_create_bus(struct device *parent, | 1043 | struct pci_bus * pci_create_bus(struct device *parent, |
1045 | int bus, struct pci_ops *ops, void *sysdata) | 1044 | int bus, struct pci_ops *ops, void *sysdata) |
1046 | { | 1045 | { |
1047 | int error; | 1046 | int error; |
@@ -1119,7 +1118,7 @@ err_out: | |||
1119 | } | 1118 | } |
1120 | EXPORT_SYMBOL_GPL(pci_create_bus); | 1119 | EXPORT_SYMBOL_GPL(pci_create_bus); |
1121 | 1120 | ||
1122 | struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, | 1121 | struct pci_bus *pci_scan_bus_parented(struct device *parent, |
1123 | int bus, struct pci_ops *ops, void *sysdata) | 1122 | int bus, struct pci_ops *ops, void *sysdata) |
1124 | { | 1123 | { |
1125 | struct pci_bus *b; | 1124 | struct pci_bus *b; |