diff options
| author | Ryan Desfosses <ryan@desfo.org> | 2014-04-25 16:32:25 -0400 |
|---|---|---|
| committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-06-10 15:36:10 -0400 |
| commit | b7fe943421396b61b9f7a97c2554ed999e0f3658 (patch) | |
| tree | 2f18bf6af90db4df0d6c5d6b6e27692626c8414c | |
| parent | 843a85ced99b9c8f8221f11d5cbcc56c2dae2842 (diff) | |
PCI: Move EXPORT_SYMBOL so it immediately follows function/variable
Move EXPORT_SYMBOL so it immediately follows the function or variable.
No functional change.
[bhelgaas: squash similar changes, fix hotplug, probe, rom, search, too]
Signed-off-by: Ryan Desfosses <ryan@desfo.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
| -rw-r--r-- | drivers/pci/bus.c | 6 | ||||
| -rw-r--r-- | drivers/pci/hotplug/acpiphp_core.c | 6 | ||||
| -rw-r--r-- | drivers/pci/hotplug/cpci_hotplug_core.c | 13 | ||||
| -rw-r--r-- | drivers/pci/hotplug/pci_hotplug_core.c | 7 | ||||
| -rw-r--r-- | drivers/pci/hotplug/rpaphp_core.c | 7 | ||||
| -rw-r--r-- | drivers/pci/htirq.c | 5 | ||||
| -rw-r--r-- | drivers/pci/pci-driver.c | 18 | ||||
| -rw-r--r-- | drivers/pci/pci.c | 106 | ||||
| -rw-r--r-- | drivers/pci/probe.c | 9 | ||||
| -rw-r--r-- | drivers/pci/rom.c | 9 | ||||
| -rw-r--r-- | drivers/pci/search.c | 15 | ||||
| -rw-r--r-- | drivers/pci/setup-res.c | 1 |
12 files changed, 89 insertions, 113 deletions
diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c index 447d393725e1..73aef51a28f0 100644 --- a/drivers/pci/bus.c +++ b/drivers/pci/bus.c | |||
| @@ -226,6 +226,7 @@ int pci_bus_alloc_resource(struct pci_bus *bus, struct resource *res, | |||
| 226 | type_mask, alignf, alignf_data, | 226 | type_mask, alignf, alignf_data, |
| 227 | &pci_32_bit); | 227 | &pci_32_bit); |
| 228 | } | 228 | } |
| 229 | EXPORT_SYMBOL(pci_bus_alloc_resource); | ||
| 229 | 230 | ||
| 230 | void __weak pcibios_resource_survey_bus(struct pci_bus *bus) { } | 231 | void __weak pcibios_resource_survey_bus(struct pci_bus *bus) { } |
| 231 | 232 | ||
| @@ -253,6 +254,7 @@ void pci_bus_add_device(struct pci_dev *dev) | |||
| 253 | 254 | ||
| 254 | dev->is_added = 1; | 255 | dev->is_added = 1; |
| 255 | } | 256 | } |
| 257 | EXPORT_SYMBOL_GPL(pci_bus_add_device); | ||
| 256 | 258 | ||
| 257 | /** | 259 | /** |
| 258 | * pci_bus_add_devices - start driver for PCI devices | 260 | * pci_bus_add_devices - start driver for PCI devices |
| @@ -279,6 +281,7 @@ void pci_bus_add_devices(const struct pci_bus *bus) | |||
| 279 | pci_bus_add_devices(child); | 281 | pci_bus_add_devices(child); |
| 280 | } | 282 | } |
| 281 | } | 283 | } |
| 284 | EXPORT_SYMBOL(pci_bus_add_devices); | ||
| 282 | 285 | ||
| 283 | /** pci_walk_bus - walk devices on/under bus, calling callback. | 286 | /** pci_walk_bus - walk devices on/under bus, calling callback. |
| 284 | * @top bus whose devices should be walked | 287 | * @top bus whose devices should be walked |
| @@ -344,6 +347,3 @@ void pci_bus_put(struct pci_bus *bus) | |||
| 344 | } | 347 | } |
| 345 | EXPORT_SYMBOL(pci_bus_put); | 348 | EXPORT_SYMBOL(pci_bus_put); |
| 346 | 349 | ||
| 347 | EXPORT_SYMBOL(pci_bus_alloc_resource); | ||
| 348 | EXPORT_SYMBOL_GPL(pci_bus_add_device); | ||
| 349 | EXPORT_SYMBOL(pci_bus_add_devices); | ||
diff --git a/drivers/pci/hotplug/acpiphp_core.c b/drivers/pci/hotplug/acpiphp_core.c index 728c31f4c2c5..e291efcd02a2 100644 --- a/drivers/pci/hotplug/acpiphp_core.c +++ b/drivers/pci/hotplug/acpiphp_core.c | |||
| @@ -63,10 +63,6 @@ MODULE_LICENSE("GPL"); | |||
| 63 | MODULE_PARM_DESC(disable, "disable acpiphp driver"); | 63 | MODULE_PARM_DESC(disable, "disable acpiphp driver"); |
| 64 | module_param_named(disable, acpiphp_disabled, bool, 0444); | 64 | module_param_named(disable, acpiphp_disabled, bool, 0444); |
| 65 | 65 | ||
| 66 | /* export the attention callback registration methods */ | ||
| 67 | EXPORT_SYMBOL_GPL(acpiphp_register_attention); | ||
| 68 | EXPORT_SYMBOL_GPL(acpiphp_unregister_attention); | ||
| 69 | |||
| 70 | static int enable_slot (struct hotplug_slot *slot); | 66 | static int enable_slot (struct hotplug_slot *slot); |
| 71 | static int disable_slot (struct hotplug_slot *slot); | 67 | static int disable_slot (struct hotplug_slot *slot); |
| 72 | static int set_attention_status (struct hotplug_slot *slot, u8 value); | 68 | static int set_attention_status (struct hotplug_slot *slot, u8 value); |
| @@ -104,6 +100,7 @@ int acpiphp_register_attention(struct acpiphp_attention_info *info) | |||
| 104 | } | 100 | } |
| 105 | return retval; | 101 | return retval; |
| 106 | } | 102 | } |
| 103 | EXPORT_SYMBOL_GPL(acpiphp_register_attention); | ||
| 107 | 104 | ||
| 108 | 105 | ||
| 109 | /** | 106 | /** |
| @@ -124,6 +121,7 @@ int acpiphp_unregister_attention(struct acpiphp_attention_info *info) | |||
| 124 | } | 121 | } |
| 125 | return retval; | 122 | return retval; |
| 126 | } | 123 | } |
| 124 | EXPORT_SYMBOL_GPL(acpiphp_unregister_attention); | ||
| 127 | 125 | ||
| 128 | 126 | ||
| 129 | /** | 127 | /** |
diff --git a/drivers/pci/hotplug/cpci_hotplug_core.c b/drivers/pci/hotplug/cpci_hotplug_core.c index 00c81a3cefc9..1bd77fdd5b13 100644 --- a/drivers/pci/hotplug/cpci_hotplug_core.c +++ b/drivers/pci/hotplug/cpci_hotplug_core.c | |||
| @@ -299,6 +299,7 @@ error_slot: | |||
| 299 | error: | 299 | error: |
| 300 | return status; | 300 | return status; |
| 301 | } | 301 | } |
| 302 | EXPORT_SYMBOL_GPL(cpci_hp_register_bus); | ||
| 302 | 303 | ||
| 303 | int | 304 | int |
| 304 | cpci_hp_unregister_bus(struct pci_bus *bus) | 305 | cpci_hp_unregister_bus(struct pci_bus *bus) |
| @@ -329,6 +330,7 @@ cpci_hp_unregister_bus(struct pci_bus *bus) | |||
| 329 | up_write(&list_rwsem); | 330 | up_write(&list_rwsem); |
| 330 | return status; | 331 | return status; |
| 331 | } | 332 | } |
| 333 | EXPORT_SYMBOL_GPL(cpci_hp_unregister_bus); | ||
| 332 | 334 | ||
| 333 | /* This is the interrupt mode interrupt handler */ | 335 | /* This is the interrupt mode interrupt handler */ |
| 334 | static irqreturn_t | 336 | static irqreturn_t |
| @@ -614,6 +616,7 @@ cpci_hp_register_controller(struct cpci_hp_controller *new_controller) | |||
| 614 | controller = new_controller; | 616 | controller = new_controller; |
| 615 | return status; | 617 | return status; |
| 616 | } | 618 | } |
| 619 | EXPORT_SYMBOL_GPL(cpci_hp_register_controller); | ||
| 617 | 620 | ||
| 618 | static void | 621 | static void |
| 619 | cleanup_slots(void) | 622 | cleanup_slots(void) |
| @@ -653,6 +656,7 @@ cpci_hp_unregister_controller(struct cpci_hp_controller *old_controller) | |||
| 653 | status = -ENODEV; | 656 | status = -ENODEV; |
| 654 | return status; | 657 | return status; |
| 655 | } | 658 | } |
| 659 | EXPORT_SYMBOL_GPL(cpci_hp_unregister_controller); | ||
| 656 | 660 | ||
| 657 | int | 661 | int |
| 658 | cpci_hp_start(void) | 662 | cpci_hp_start(void) |
| @@ -690,6 +694,7 @@ cpci_hp_start(void) | |||
| 690 | dbg("%s - exit", __func__); | 694 | dbg("%s - exit", __func__); |
| 691 | return 0; | 695 | return 0; |
| 692 | } | 696 | } |
| 697 | EXPORT_SYMBOL_GPL(cpci_hp_start); | ||
| 693 | 698 | ||
| 694 | int | 699 | int |
| 695 | cpci_hp_stop(void) | 700 | cpci_hp_stop(void) |
| @@ -704,6 +709,7 @@ cpci_hp_stop(void) | |||
| 704 | cpci_stop_thread(); | 709 | cpci_stop_thread(); |
| 705 | return 0; | 710 | return 0; |
| 706 | } | 711 | } |
| 712 | EXPORT_SYMBOL_GPL(cpci_hp_stop); | ||
| 707 | 713 | ||
| 708 | int __init | 714 | int __init |
| 709 | cpci_hotplug_init(int debug) | 715 | cpci_hotplug_init(int debug) |
| @@ -721,10 +727,3 @@ cpci_hotplug_exit(void) | |||
| 721 | cpci_hp_stop(); | 727 | cpci_hp_stop(); |
| 722 | cpci_hp_unregister_controller(controller); | 728 | cpci_hp_unregister_controller(controller); |
| 723 | } | 729 | } |
| 724 | |||
| 725 | EXPORT_SYMBOL_GPL(cpci_hp_register_controller); | ||
| 726 | EXPORT_SYMBOL_GPL(cpci_hp_unregister_controller); | ||
| 727 | EXPORT_SYMBOL_GPL(cpci_hp_register_bus); | ||
| 728 | EXPORT_SYMBOL_GPL(cpci_hp_unregister_bus); | ||
| 729 | EXPORT_SYMBOL_GPL(cpci_hp_start); | ||
| 730 | EXPORT_SYMBOL_GPL(cpci_hp_stop); | ||
diff --git a/drivers/pci/hotplug/pci_hotplug_core.c b/drivers/pci/hotplug/pci_hotplug_core.c index cfa92a984e62..ef496457f8d0 100644 --- a/drivers/pci/hotplug/pci_hotplug_core.c +++ b/drivers/pci/hotplug/pci_hotplug_core.c | |||
| @@ -468,6 +468,7 @@ out: | |||
| 468 | mutex_unlock(&pci_hp_mutex); | 468 | mutex_unlock(&pci_hp_mutex); |
| 469 | return result; | 469 | return result; |
| 470 | } | 470 | } |
| 471 | EXPORT_SYMBOL_GPL(__pci_hp_register); | ||
| 471 | 472 | ||
| 472 | /** | 473 | /** |
| 473 | * pci_hp_deregister - deregister a hotplug_slot with the PCI hotplug subsystem | 474 | * pci_hp_deregister - deregister a hotplug_slot with the PCI hotplug subsystem |
| @@ -506,6 +507,7 @@ int pci_hp_deregister(struct hotplug_slot *hotplug) | |||
| 506 | 507 | ||
| 507 | return 0; | 508 | return 0; |
| 508 | } | 509 | } |
| 510 | EXPORT_SYMBOL_GPL(pci_hp_deregister); | ||
| 509 | 511 | ||
| 510 | /** | 512 | /** |
| 511 | * pci_hp_change_slot_info - changes the slot's information structure in the core | 513 | * pci_hp_change_slot_info - changes the slot's information structure in the core |
| @@ -527,6 +529,7 @@ int pci_hp_change_slot_info(struct hotplug_slot *hotplug, | |||
| 527 | 529 | ||
| 528 | return 0; | 530 | return 0; |
| 529 | } | 531 | } |
| 532 | EXPORT_SYMBOL_GPL(pci_hp_change_slot_info); | ||
| 530 | 533 | ||
| 531 | static int __init pci_hotplug_init (void) | 534 | static int __init pci_hotplug_init (void) |
| 532 | { | 535 | { |
| @@ -557,7 +560,3 @@ MODULE_DESCRIPTION(DRIVER_DESC); | |||
| 557 | MODULE_LICENSE("GPL"); | 560 | MODULE_LICENSE("GPL"); |
| 558 | module_param(debug, bool, 0644); | 561 | module_param(debug, bool, 0644); |
| 559 | MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); | 562 | MODULE_PARM_DESC(debug, "Debugging mode enabled or not"); |
| 560 | |||
| 561 | EXPORT_SYMBOL_GPL(__pci_hp_register); | ||
| 562 | EXPORT_SYMBOL_GPL(pci_hp_deregister); | ||
| 563 | EXPORT_SYMBOL_GPL(pci_hp_change_slot_info); | ||
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c index 984d708552f6..f2abfc6ec7c8 100644 --- a/drivers/pci/hotplug/rpaphp_core.c +++ b/drivers/pci/hotplug/rpaphp_core.c | |||
| @@ -39,6 +39,7 @@ | |||
| 39 | 39 | ||
| 40 | bool rpaphp_debug; | 40 | bool rpaphp_debug; |
| 41 | LIST_HEAD(rpaphp_slot_head); | 41 | LIST_HEAD(rpaphp_slot_head); |
| 42 | EXPORT_SYMBOL_GPL(rpaphp_slot_head); | ||
| 42 | 43 | ||
| 43 | #define DRIVER_VERSION "0.1" | 44 | #define DRIVER_VERSION "0.1" |
| 44 | #define DRIVER_AUTHOR "Linda Xie <lxie@us.ibm.com>" | 45 | #define DRIVER_AUTHOR "Linda Xie <lxie@us.ibm.com>" |
| @@ -241,6 +242,7 @@ int rpaphp_get_drc_props(struct device_node *dn, int *drc_index, | |||
| 241 | 242 | ||
| 242 | return -EINVAL; | 243 | return -EINVAL; |
| 243 | } | 244 | } |
| 245 | EXPORT_SYMBOL_GPL(rpaphp_get_drc_props); | ||
| 244 | 246 | ||
| 245 | static int is_php_type(char *drc_type) | 247 | static int is_php_type(char *drc_type) |
| 246 | { | 248 | { |
| @@ -350,6 +352,7 @@ int rpaphp_add_slot(struct device_node *dn) | |||
| 350 | /* XXX FIXME: reports a failure only if last entry in loop failed */ | 352 | /* XXX FIXME: reports a failure only if last entry in loop failed */ |
| 351 | return retval; | 353 | return retval; |
| 352 | } | 354 | } |
| 355 | EXPORT_SYMBOL_GPL(rpaphp_add_slot); | ||
| 353 | 356 | ||
| 354 | static void __exit cleanup_slots(void) | 357 | static void __exit cleanup_slots(void) |
| 355 | { | 358 | { |
| @@ -443,7 +446,3 @@ struct hotplug_slot_ops rpaphp_hotplug_slot_ops = { | |||
| 443 | 446 | ||
| 444 | module_init(rpaphp_init); | 447 | module_init(rpaphp_init); |
| 445 | module_exit(rpaphp_exit); | 448 | module_exit(rpaphp_exit); |
| 446 | |||
| 447 | EXPORT_SYMBOL_GPL(rpaphp_add_slot); | ||
| 448 | EXPORT_SYMBOL_GPL(rpaphp_slot_head); | ||
| 449 | EXPORT_SYMBOL_GPL(rpaphp_get_drc_props); | ||
diff --git a/drivers/pci/htirq.c b/drivers/pci/htirq.c index 6e373ea57b32..847912c5f4a3 100644 --- a/drivers/pci/htirq.c +++ b/drivers/pci/htirq.c | |||
| @@ -136,6 +136,7 @@ int __ht_create_irq(struct pci_dev *dev, int idx, ht_irq_update_t *update) | |||
| 136 | 136 | ||
| 137 | return irq; | 137 | return irq; |
| 138 | } | 138 | } |
| 139 | EXPORT_SYMBOL(__ht_create_irq); | ||
| 139 | 140 | ||
| 140 | /** | 141 | /** |
| 141 | * ht_create_irq - create an irq and attach it to a device. | 142 | * ht_create_irq - create an irq and attach it to a device. |
| @@ -151,6 +152,7 @@ int ht_create_irq(struct pci_dev *dev, int idx) | |||
| 151 | { | 152 | { |
| 152 | return __ht_create_irq(dev, idx, NULL); | 153 | return __ht_create_irq(dev, idx, NULL); |
| 153 | } | 154 | } |
| 155 | EXPORT_SYMBOL(ht_create_irq); | ||
| 154 | 156 | ||
| 155 | /** | 157 | /** |
| 156 | * ht_destroy_irq - destroy an irq created with ht_create_irq | 158 | * ht_destroy_irq - destroy an irq created with ht_create_irq |
| @@ -170,7 +172,4 @@ void ht_destroy_irq(unsigned int irq) | |||
| 170 | 172 | ||
| 171 | kfree(cfg); | 173 | kfree(cfg); |
| 172 | } | 174 | } |
| 173 | |||
| 174 | EXPORT_SYMBOL(__ht_create_irq); | ||
| 175 | EXPORT_SYMBOL(ht_create_irq); | ||
| 176 | EXPORT_SYMBOL(ht_destroy_irq); | 175 | EXPORT_SYMBOL(ht_destroy_irq); |
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 837d71f5390b..b91a17fe425b 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
| @@ -77,6 +77,7 @@ int pci_add_dynid(struct pci_driver *drv, | |||
| 77 | 77 | ||
| 78 | return retval; | 78 | return retval; |
| 79 | } | 79 | } |
| 80 | EXPORT_SYMBOL_GPL(pci_add_dynid); | ||
| 80 | 81 | ||
| 81 | static void pci_free_dynids(struct pci_driver *drv) | 82 | static void pci_free_dynids(struct pci_driver *drv) |
| 82 | { | 83 | { |
| @@ -235,6 +236,7 @@ const struct pci_device_id *pci_match_id(const struct pci_device_id *ids, | |||
| 235 | } | 236 | } |
| 236 | return NULL; | 237 | return NULL; |
| 237 | } | 238 | } |
| 239 | EXPORT_SYMBOL(pci_match_id); | ||
| 238 | 240 | ||
| 239 | static const struct pci_device_id pci_device_id_any = { | 241 | static const struct pci_device_id pci_device_id_any = { |
| 240 | .vendor = PCI_ANY_ID, | 242 | .vendor = PCI_ANY_ID, |
| @@ -1255,6 +1257,7 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner, | |||
| 1255 | /* register with core */ | 1257 | /* register with core */ |
| 1256 | return driver_register(&drv->driver); | 1258 | return driver_register(&drv->driver); |
| 1257 | } | 1259 | } |
| 1260 | EXPORT_SYMBOL(__pci_register_driver); | ||
| 1258 | 1261 | ||
| 1259 | /** | 1262 | /** |
| 1260 | * pci_unregister_driver - unregister a pci driver | 1263 | * pci_unregister_driver - unregister a pci driver |
| @@ -1272,6 +1275,7 @@ pci_unregister_driver(struct pci_driver *drv) | |||
| 1272 | driver_unregister(&drv->driver); | 1275 | driver_unregister(&drv->driver); |
| 1273 | pci_free_dynids(drv); | 1276 | pci_free_dynids(drv); |
| 1274 | } | 1277 | } |
| 1278 | EXPORT_SYMBOL(pci_unregister_driver); | ||
| 1275 | 1279 | ||
| 1276 | static struct pci_driver pci_compat_driver = { | 1280 | static struct pci_driver pci_compat_driver = { |
| 1277 | .name = "compat" | 1281 | .name = "compat" |
| @@ -1297,6 +1301,7 @@ pci_dev_driver(const struct pci_dev *dev) | |||
| 1297 | } | 1301 | } |
| 1298 | return NULL; | 1302 | return NULL; |
| 1299 | } | 1303 | } |
| 1304 | EXPORT_SYMBOL(pci_dev_driver); | ||
| 1300 | 1305 | ||
| 1301 | /** | 1306 | /** |
| 1302 | * pci_bus_match - Tell if a PCI device structure has a matching PCI device id structure | 1307 | * pci_bus_match - Tell if a PCI device structure has a matching PCI device id structure |
| @@ -1342,6 +1347,7 @@ struct pci_dev *pci_dev_get(struct pci_dev *dev) | |||
| 1342 | get_device(&dev->dev); | 1347 | get_device(&dev->dev); |
| 1343 | return dev; | 1348 | return dev; |
| 1344 | } | 1349 | } |
| 1350 | EXPORT_SYMBOL(pci_dev_get); | ||
| 1345 | 1351 | ||
| 1346 | /** | 1352 | /** |
| 1347 | * pci_dev_put - release a use of the pci device structure | 1353 | * pci_dev_put - release a use of the pci device structure |
| @@ -1355,6 +1361,7 @@ void pci_dev_put(struct pci_dev *dev) | |||
| 1355 | if (dev) | 1361 | if (dev) |
| 1356 | put_device(&dev->dev); | 1362 | put_device(&dev->dev); |
| 1357 | } | 1363 | } |
| 1364 | EXPORT_SYMBOL(pci_dev_put); | ||
| 1358 | 1365 | ||
| 1359 | static int pci_uevent(struct device *dev, struct kobj_uevent_env *env) | 1366 | static int pci_uevent(struct device *dev, struct kobj_uevent_env *env) |
| 1360 | { | 1367 | { |
| @@ -1400,19 +1407,10 @@ struct bus_type pci_bus_type = { | |||
| 1400 | .drv_groups = pci_drv_groups, | 1407 | .drv_groups = pci_drv_groups, |
| 1401 | .pm = PCI_PM_OPS_PTR, | 1408 | .pm = PCI_PM_OPS_PTR, |
| 1402 | }; | 1409 | }; |
| 1410 | EXPORT_SYMBOL(pci_bus_type); | ||
| 1403 | 1411 | ||
| 1404 | static int __init pci_driver_init(void) | 1412 | static int __init pci_driver_init(void) |
| 1405 | { | 1413 | { |
| 1406 | return bus_register(&pci_bus_type); | 1414 | return bus_register(&pci_bus_type); |
| 1407 | } | 1415 | } |
| 1408 | |||
| 1409 | postcore_initcall(pci_driver_init); | 1416 | postcore_initcall(pci_driver_init); |
| 1410 | |||
| 1411 | EXPORT_SYMBOL_GPL(pci_add_dynid); | ||
| 1412 | EXPORT_SYMBOL(pci_match_id); | ||
| 1413 | EXPORT_SYMBOL(__pci_register_driver); | ||
| 1414 | EXPORT_SYMBOL(pci_unregister_driver); | ||
| 1415 | EXPORT_SYMBOL(pci_dev_driver); | ||
| 1416 | EXPORT_SYMBOL(pci_bus_type); | ||
| 1417 | EXPORT_SYMBOL(pci_dev_get); | ||
| 1418 | EXPORT_SYMBOL(pci_dev_put); | ||
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index fd958c8ebd83..51ec8b481280 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -226,6 +226,7 @@ int pci_find_capability(struct pci_dev *dev, int cap) | |||
| 226 | 226 | ||
| 227 | return pos; | 227 | return pos; |
| 228 | } | 228 | } |
| 229 | EXPORT_SYMBOL(pci_find_capability); | ||
| 229 | 230 | ||
| 230 | /** | 231 | /** |
| 231 | * pci_bus_find_capability - query for devices' capabilities | 232 | * pci_bus_find_capability - query for devices' capabilities |
| @@ -253,6 +254,7 @@ int pci_bus_find_capability(struct pci_bus *bus, unsigned int devfn, int cap) | |||
| 253 | 254 | ||
| 254 | return pos; | 255 | return pos; |
| 255 | } | 256 | } |
| 257 | EXPORT_SYMBOL(pci_bus_find_capability); | ||
| 256 | 258 | ||
| 257 | /** | 259 | /** |
| 258 | * pci_find_next_ext_capability - Find an extended capability | 260 | * pci_find_next_ext_capability - Find an extended capability |
| @@ -436,6 +438,7 @@ pci_find_parent_resource(const struct pci_dev *dev, struct resource *res) | |||
| 436 | } | 438 | } |
| 437 | return NULL; | 439 | return NULL; |
| 438 | } | 440 | } |
| 441 | EXPORT_SYMBOL(pci_find_parent_resource); | ||
| 439 | 442 | ||
| 440 | /** | 443 | /** |
| 441 | * pci_wait_for_pending - wait for @mask bit(s) to clear in status word @pos | 444 | * pci_wait_for_pending - wait for @mask bit(s) to clear in status word @pos |
| @@ -846,6 +849,7 @@ int pci_set_power_state(struct pci_dev *dev, pci_power_t state) | |||
| 846 | 849 | ||
| 847 | return error; | 850 | return error; |
| 848 | } | 851 | } |
| 852 | EXPORT_SYMBOL(pci_set_power_state); | ||
| 849 | 853 | ||
| 850 | /** | 854 | /** |
| 851 | * pci_choose_state - Choose the power state of a PCI device | 855 | * pci_choose_state - Choose the power state of a PCI device |
| @@ -1017,6 +1021,7 @@ pci_save_state(struct pci_dev *dev) | |||
| 1017 | return i; | 1021 | return i; |
| 1018 | return 0; | 1022 | return 0; |
| 1019 | } | 1023 | } |
| 1024 | EXPORT_SYMBOL(pci_save_state); | ||
| 1020 | 1025 | ||
| 1021 | static void pci_restore_config_dword(struct pci_dev *pdev, int offset, | 1026 | static void pci_restore_config_dword(struct pci_dev *pdev, int offset, |
| 1022 | u32 saved_val, int retry) | 1027 | u32 saved_val, int retry) |
| @@ -1087,6 +1092,7 @@ void pci_restore_state(struct pci_dev *dev) | |||
| 1087 | 1092 | ||
| 1088 | dev->state_saved = false; | 1093 | dev->state_saved = false; |
| 1089 | } | 1094 | } |
| 1095 | EXPORT_SYMBOL(pci_restore_state); | ||
| 1090 | 1096 | ||
| 1091 | struct pci_saved_state { | 1097 | struct pci_saved_state { |
| 1092 | u32 config_space[16]; | 1098 | u32 config_space[16]; |
| @@ -1231,6 +1237,7 @@ int pci_reenable_device(struct pci_dev *dev) | |||
| 1231 | return do_pci_enable_device(dev, (1 << PCI_NUM_RESOURCES) - 1); | 1237 | return do_pci_enable_device(dev, (1 << PCI_NUM_RESOURCES) - 1); |
| 1232 | return 0; | 1238 | return 0; |
| 1233 | } | 1239 | } |
| 1240 | EXPORT_SYMBOL(pci_reenable_device); | ||
| 1234 | 1241 | ||
| 1235 | static void pci_enable_bridge(struct pci_dev *dev) | 1242 | static void pci_enable_bridge(struct pci_dev *dev) |
| 1236 | { | 1243 | { |
| @@ -1305,6 +1312,7 @@ int pci_enable_device_io(struct pci_dev *dev) | |||
| 1305 | { | 1312 | { |
| 1306 | return pci_enable_device_flags(dev, IORESOURCE_IO); | 1313 | return pci_enable_device_flags(dev, IORESOURCE_IO); |
| 1307 | } | 1314 | } |
| 1315 | EXPORT_SYMBOL(pci_enable_device_io); | ||
| 1308 | 1316 | ||
| 1309 | /** | 1317 | /** |
| 1310 | * pci_enable_device_mem - Initialize a device for use with Memory space | 1318 | * pci_enable_device_mem - Initialize a device for use with Memory space |
| @@ -1318,6 +1326,7 @@ int pci_enable_device_mem(struct pci_dev *dev) | |||
| 1318 | { | 1326 | { |
| 1319 | return pci_enable_device_flags(dev, IORESOURCE_MEM); | 1327 | return pci_enable_device_flags(dev, IORESOURCE_MEM); |
| 1320 | } | 1328 | } |
| 1329 | EXPORT_SYMBOL(pci_enable_device_mem); | ||
| 1321 | 1330 | ||
| 1322 | /** | 1331 | /** |
| 1323 | * pci_enable_device - Initialize device before it's used by a driver. | 1332 | * pci_enable_device - Initialize device before it's used by a driver. |
| @@ -1334,6 +1343,7 @@ int pci_enable_device(struct pci_dev *dev) | |||
| 1334 | { | 1343 | { |
| 1335 | return pci_enable_device_flags(dev, IORESOURCE_MEM | IORESOURCE_IO); | 1344 | return pci_enable_device_flags(dev, IORESOURCE_MEM | IORESOURCE_IO); |
| 1336 | } | 1345 | } |
| 1346 | EXPORT_SYMBOL(pci_enable_device); | ||
| 1337 | 1347 | ||
| 1338 | /* | 1348 | /* |
| 1339 | * Managed PCI resources. This manages device on/off, intx/msi/msix | 1349 | * Managed PCI resources. This manages device on/off, intx/msi/msix |
| @@ -1416,6 +1426,7 @@ int pcim_enable_device(struct pci_dev *pdev) | |||
| 1416 | } | 1426 | } |
| 1417 | return rc; | 1427 | return rc; |
| 1418 | } | 1428 | } |
| 1429 | EXPORT_SYMBOL(pcim_enable_device); | ||
| 1419 | 1430 | ||
| 1420 | /** | 1431 | /** |
| 1421 | * pcim_pin_device - Pin managed PCI device | 1432 | * pcim_pin_device - Pin managed PCI device |
| @@ -1434,6 +1445,7 @@ void pcim_pin_device(struct pci_dev *pdev) | |||
| 1434 | if (dr) | 1445 | if (dr) |
| 1435 | dr->pinned = 1; | 1446 | dr->pinned = 1; |
| 1436 | } | 1447 | } |
| 1448 | EXPORT_SYMBOL(pcim_pin_device); | ||
| 1437 | 1449 | ||
| 1438 | /* | 1450 | /* |
| 1439 | * pcibios_add_device - provide arch specific hooks when adding device dev | 1451 | * pcibios_add_device - provide arch specific hooks when adding device dev |
| @@ -1534,6 +1546,7 @@ pci_disable_device(struct pci_dev *dev) | |||
| 1534 | 1546 | ||
| 1535 | dev->is_busmaster = 0; | 1547 | dev->is_busmaster = 0; |
| 1536 | } | 1548 | } |
| 1549 | EXPORT_SYMBOL(pci_disable_device); | ||
| 1537 | 1550 | ||
| 1538 | /** | 1551 | /** |
| 1539 | * pcibios_set_pcie_reset_state - set reset state for device dev | 1552 | * pcibios_set_pcie_reset_state - set reset state for device dev |
| @@ -1562,6 +1575,7 @@ int pci_set_pcie_reset_state(struct pci_dev *dev, enum pcie_reset_state state) | |||
| 1562 | { | 1575 | { |
| 1563 | return pcibios_set_pcie_reset_state(dev, state); | 1576 | return pcibios_set_pcie_reset_state(dev, state); |
| 1564 | } | 1577 | } |
| 1578 | EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state); | ||
| 1565 | 1579 | ||
| 1566 | /** | 1580 | /** |
| 1567 | * pci_check_pme_status - Check if given device has generated PME. | 1581 | * pci_check_pme_status - Check if given device has generated PME. |
| @@ -1641,6 +1655,7 @@ bool pci_pme_capable(struct pci_dev *dev, pci_power_t state) | |||
| 1641 | 1655 | ||
| 1642 | return !!(dev->pme_support & (1 << state)); | 1656 | return !!(dev->pme_support & (1 << state)); |
| 1643 | } | 1657 | } |
| 1658 | EXPORT_SYMBOL(pci_pme_capable); | ||
| 1644 | 1659 | ||
| 1645 | static void pci_pme_list_scan(struct work_struct *work) | 1660 | static void pci_pme_list_scan(struct work_struct *work) |
| 1646 | { | 1661 | { |
| @@ -1745,6 +1760,7 @@ void pci_pme_active(struct pci_dev *dev, bool enable) | |||
| 1745 | 1760 | ||
| 1746 | dev_dbg(&dev->dev, "PME# %s\n", enable ? "enabled" : "disabled"); | 1761 | dev_dbg(&dev->dev, "PME# %s\n", enable ? "enabled" : "disabled"); |
| 1747 | } | 1762 | } |
| 1763 | EXPORT_SYMBOL(pci_pme_active); | ||
| 1748 | 1764 | ||
| 1749 | /** | 1765 | /** |
| 1750 | * __pci_enable_wake - enable PCI device as wakeup event source | 1766 | * __pci_enable_wake - enable PCI device as wakeup event source |
| @@ -1830,6 +1846,7 @@ int pci_wake_from_d3(struct pci_dev *dev, bool enable) | |||
| 1830 | pci_enable_wake(dev, PCI_D3cold, enable) : | 1846 | pci_enable_wake(dev, PCI_D3cold, enable) : |
| 1831 | pci_enable_wake(dev, PCI_D3hot, enable); | 1847 | pci_enable_wake(dev, PCI_D3hot, enable); |
| 1832 | } | 1848 | } |
| 1849 | EXPORT_SYMBOL(pci_wake_from_d3); | ||
| 1833 | 1850 | ||
| 1834 | /** | 1851 | /** |
| 1835 | * pci_target_state - find an appropriate low power state for a given PCI dev | 1852 | * pci_target_state - find an appropriate low power state for a given PCI dev |
| @@ -1908,6 +1925,7 @@ int pci_prepare_to_sleep(struct pci_dev *dev) | |||
| 1908 | 1925 | ||
| 1909 | return error; | 1926 | return error; |
| 1910 | } | 1927 | } |
| 1928 | EXPORT_SYMBOL(pci_prepare_to_sleep); | ||
| 1911 | 1929 | ||
| 1912 | /** | 1930 | /** |
| 1913 | * pci_back_from_sleep - turn PCI device on during system-wide transition into working state | 1931 | * pci_back_from_sleep - turn PCI device on during system-wide transition into working state |
| @@ -1920,6 +1938,7 @@ int pci_back_from_sleep(struct pci_dev *dev) | |||
| 1920 | pci_enable_wake(dev, PCI_D0, false); | 1938 | pci_enable_wake(dev, PCI_D0, false); |
| 1921 | return pci_set_power_state(dev, PCI_D0); | 1939 | return pci_set_power_state(dev, PCI_D0); |
| 1922 | } | 1940 | } |
| 1941 | EXPORT_SYMBOL(pci_back_from_sleep); | ||
| 1923 | 1942 | ||
| 1924 | /** | 1943 | /** |
| 1925 | * pci_finish_runtime_suspend - Carry out PCI-specific part of runtime suspend. | 1944 | * pci_finish_runtime_suspend - Carry out PCI-specific part of runtime suspend. |
| @@ -2478,6 +2497,7 @@ void pci_release_region(struct pci_dev *pdev, int bar) | |||
| 2478 | if (dr) | 2497 | if (dr) |
| 2479 | dr->region_mask &= ~(1 << bar); | 2498 | dr->region_mask &= ~(1 << bar); |
| 2480 | } | 2499 | } |
| 2500 | EXPORT_SYMBOL(pci_release_region); | ||
| 2481 | 2501 | ||
| 2482 | /** | 2502 | /** |
| 2483 | * __pci_request_region - Reserved PCI I/O and memory resource | 2503 | * __pci_request_region - Reserved PCI I/O and memory resource |
| @@ -2548,6 +2568,7 @@ int pci_request_region(struct pci_dev *pdev, int bar, const char *res_name) | |||
| 2548 | { | 2568 | { |
| 2549 | return __pci_request_region(pdev, bar, res_name, 0); | 2569 | return __pci_request_region(pdev, bar, res_name, 0); |
| 2550 | } | 2570 | } |
| 2571 | EXPORT_SYMBOL(pci_request_region); | ||
| 2551 | 2572 | ||
| 2552 | /** | 2573 | /** |
| 2553 | * pci_request_region_exclusive - Reserved PCI I/O and memory resource | 2574 | * pci_request_region_exclusive - Reserved PCI I/O and memory resource |
| @@ -2571,6 +2592,8 @@ int pci_request_region_exclusive(struct pci_dev *pdev, int bar, const char *res_ | |||
| 2571 | { | 2592 | { |
| 2572 | return __pci_request_region(pdev, bar, res_name, IORESOURCE_EXCLUSIVE); | 2593 | return __pci_request_region(pdev, bar, res_name, IORESOURCE_EXCLUSIVE); |
| 2573 | } | 2594 | } |
| 2595 | EXPORT_SYMBOL(pci_request_region_exclusive); | ||
| 2596 | |||
| 2574 | /** | 2597 | /** |
| 2575 | * pci_release_selected_regions - Release selected PCI I/O and memory resources | 2598 | * pci_release_selected_regions - Release selected PCI I/O and memory resources |
| 2576 | * @pdev: PCI device whose resources were previously reserved | 2599 | * @pdev: PCI device whose resources were previously reserved |
| @@ -2587,6 +2610,7 @@ void pci_release_selected_regions(struct pci_dev *pdev, int bars) | |||
| 2587 | if (bars & (1 << i)) | 2610 | if (bars & (1 << i)) |
| 2588 | pci_release_region(pdev, i); | 2611 | pci_release_region(pdev, i); |
| 2589 | } | 2612 | } |
| 2613 | EXPORT_SYMBOL(pci_release_selected_regions); | ||
| 2590 | 2614 | ||
| 2591 | static int __pci_request_selected_regions(struct pci_dev *pdev, int bars, | 2615 | static int __pci_request_selected_regions(struct pci_dev *pdev, int bars, |
| 2592 | const char *res_name, int excl) | 2616 | const char *res_name, int excl) |
| @@ -2619,6 +2643,7 @@ int pci_request_selected_regions(struct pci_dev *pdev, int bars, | |||
| 2619 | { | 2643 | { |
| 2620 | return __pci_request_selected_regions(pdev, bars, res_name, 0); | 2644 | return __pci_request_selected_regions(pdev, bars, res_name, 0); |
| 2621 | } | 2645 | } |
| 2646 | EXPORT_SYMBOL(pci_request_selected_regions); | ||
| 2622 | 2647 | ||
| 2623 | int pci_request_selected_regions_exclusive(struct pci_dev *pdev, | 2648 | int pci_request_selected_regions_exclusive(struct pci_dev *pdev, |
| 2624 | int bars, const char *res_name) | 2649 | int bars, const char *res_name) |
| @@ -2626,6 +2651,7 @@ int pci_request_selected_regions_exclusive(struct pci_dev *pdev, | |||
| 2626 | return __pci_request_selected_regions(pdev, bars, res_name, | 2651 | return __pci_request_selected_regions(pdev, bars, res_name, |
| 2627 | IORESOURCE_EXCLUSIVE); | 2652 | IORESOURCE_EXCLUSIVE); |
| 2628 | } | 2653 | } |
| 2654 | EXPORT_SYMBOL(pci_request_selected_regions_exclusive); | ||
| 2629 | 2655 | ||
| 2630 | /** | 2656 | /** |
| 2631 | * pci_release_regions - Release reserved PCI I/O and memory resources | 2657 | * pci_release_regions - Release reserved PCI I/O and memory resources |
| @@ -2640,6 +2666,7 @@ void pci_release_regions(struct pci_dev *pdev) | |||
| 2640 | { | 2666 | { |
| 2641 | pci_release_selected_regions(pdev, (1 << 6) - 1); | 2667 | pci_release_selected_regions(pdev, (1 << 6) - 1); |
| 2642 | } | 2668 | } |
| 2669 | EXPORT_SYMBOL(pci_release_regions); | ||
| 2643 | 2670 | ||
| 2644 | /** | 2671 | /** |
| 2645 | * pci_request_regions - Reserved PCI I/O and memory resources | 2672 | * pci_request_regions - Reserved PCI I/O and memory resources |
| @@ -2658,6 +2685,7 @@ int pci_request_regions(struct pci_dev *pdev, const char *res_name) | |||
| 2658 | { | 2685 | { |
| 2659 | return pci_request_selected_regions(pdev, ((1 << 6) - 1), res_name); | 2686 | return pci_request_selected_regions(pdev, ((1 << 6) - 1), res_name); |
| 2660 | } | 2687 | } |
| 2688 | EXPORT_SYMBOL(pci_request_regions); | ||
| 2661 | 2689 | ||
| 2662 | /** | 2690 | /** |
| 2663 | * pci_request_regions_exclusive - Reserved PCI I/O and memory resources | 2691 | * pci_request_regions_exclusive - Reserved PCI I/O and memory resources |
| @@ -2680,6 +2708,7 @@ int pci_request_regions_exclusive(struct pci_dev *pdev, const char *res_name) | |||
| 2680 | return pci_request_selected_regions_exclusive(pdev, | 2708 | return pci_request_selected_regions_exclusive(pdev, |
| 2681 | ((1 << 6) - 1), res_name); | 2709 | ((1 << 6) - 1), res_name); |
| 2682 | } | 2710 | } |
| 2711 | EXPORT_SYMBOL(pci_request_regions_exclusive); | ||
| 2683 | 2712 | ||
| 2684 | static void __pci_set_master(struct pci_dev *dev, bool enable) | 2713 | static void __pci_set_master(struct pci_dev *dev, bool enable) |
| 2685 | { | 2714 | { |
| @@ -2749,6 +2778,7 @@ void pci_set_master(struct pci_dev *dev) | |||
| 2749 | __pci_set_master(dev, true); | 2778 | __pci_set_master(dev, true); |
| 2750 | pcibios_set_master(dev); | 2779 | pcibios_set_master(dev); |
| 2751 | } | 2780 | } |
| 2781 | EXPORT_SYMBOL(pci_set_master); | ||
| 2752 | 2782 | ||
| 2753 | /** | 2783 | /** |
| 2754 | * pci_clear_master - disables bus-mastering for device dev | 2784 | * pci_clear_master - disables bus-mastering for device dev |
| @@ -2758,6 +2788,7 @@ void pci_clear_master(struct pci_dev *dev) | |||
| 2758 | { | 2788 | { |
| 2759 | __pci_set_master(dev, false); | 2789 | __pci_set_master(dev, false); |
| 2760 | } | 2790 | } |
| 2791 | EXPORT_SYMBOL(pci_clear_master); | ||
| 2761 | 2792 | ||
| 2762 | /** | 2793 | /** |
| 2763 | * pci_set_cacheline_size - ensure the CACHE_LINE_SIZE register is programmed | 2794 | * pci_set_cacheline_size - ensure the CACHE_LINE_SIZE register is programmed |
| @@ -2797,23 +2828,6 @@ int pci_set_cacheline_size(struct pci_dev *dev) | |||
| 2797 | } | 2828 | } |
| 2798 | EXPORT_SYMBOL_GPL(pci_set_cacheline_size); | 2829 | EXPORT_SYMBOL_GPL(pci_set_cacheline_size); |
| 2799 | 2830 | ||
| 2800 | #ifdef PCI_DISABLE_MWI | ||
| 2801 | int pci_set_mwi(struct pci_dev *dev) | ||
| 2802 | { | ||
| 2803 | return 0; | ||
| 2804 | } | ||
| 2805 | |||
| 2806 | int pci_try_set_mwi(struct pci_dev *dev) | ||
| 2807 | { | ||
| 2808 | return 0; | ||
| 2809 | } | ||
| 2810 | |||
| 2811 | void pci_clear_mwi(struct pci_dev *dev) | ||
| 2812 | { | ||
| 2813 | } | ||
| 2814 | |||
| 2815 | #else | ||
| 2816 | |||
| 2817 | /** | 2831 | /** |
| 2818 | * pci_set_mwi - enables memory-write-invalidate PCI transaction | 2832 | * pci_set_mwi - enables memory-write-invalidate PCI transaction |
| 2819 | * @dev: the PCI device for which MWI is enabled | 2833 | * @dev: the PCI device for which MWI is enabled |
| @@ -2825,6 +2839,9 @@ void pci_clear_mwi(struct pci_dev *dev) | |||
| 2825 | int | 2839 | int |
| 2826 | pci_set_mwi(struct pci_dev *dev) | 2840 | pci_set_mwi(struct pci_dev *dev) |
| 2827 | { | 2841 | { |
| 2842 | #ifdef PCI_DISABLE_MWI | ||
| 2843 | return 0; | ||
| 2844 | #else | ||
| 2828 | int rc; | 2845 | int rc; |
| 2829 | u16 cmd; | 2846 | u16 cmd; |
| 2830 | 2847 | ||
| @@ -2838,9 +2855,10 @@ pci_set_mwi(struct pci_dev *dev) | |||
| 2838 | cmd |= PCI_COMMAND_INVALIDATE; | 2855 | cmd |= PCI_COMMAND_INVALIDATE; |
| 2839 | pci_write_config_word(dev, PCI_COMMAND, cmd); | 2856 | pci_write_config_word(dev, PCI_COMMAND, cmd); |
| 2840 | } | 2857 | } |
| 2841 | |||
| 2842 | return 0; | 2858 | return 0; |
| 2859 | #endif | ||
| 2843 | } | 2860 | } |
| 2861 | EXPORT_SYMBOL(pci_set_mwi); | ||
| 2844 | 2862 | ||
| 2845 | /** | 2863 | /** |
| 2846 | * pci_try_set_mwi - enables memory-write-invalidate PCI transaction | 2864 | * pci_try_set_mwi - enables memory-write-invalidate PCI transaction |
| @@ -2853,9 +2871,13 @@ pci_set_mwi(struct pci_dev *dev) | |||
| 2853 | */ | 2871 | */ |
| 2854 | int pci_try_set_mwi(struct pci_dev *dev) | 2872 | int pci_try_set_mwi(struct pci_dev *dev) |
| 2855 | { | 2873 | { |
| 2856 | int rc = pci_set_mwi(dev); | 2874 | #ifdef PCI_DISABLE_MWI |
| 2857 | return rc; | 2875 | return 0; |
| 2876 | #else | ||
| 2877 | return pci_set_mwi(dev); | ||
| 2878 | #endif | ||
| 2858 | } | 2879 | } |
| 2880 | EXPORT_SYMBOL(pci_try_set_mwi); | ||
| 2859 | 2881 | ||
| 2860 | /** | 2882 | /** |
| 2861 | * pci_clear_mwi - disables Memory-Write-Invalidate for device dev | 2883 | * pci_clear_mwi - disables Memory-Write-Invalidate for device dev |
| @@ -2866,6 +2888,7 @@ int pci_try_set_mwi(struct pci_dev *dev) | |||
| 2866 | void | 2888 | void |
| 2867 | pci_clear_mwi(struct pci_dev *dev) | 2889 | pci_clear_mwi(struct pci_dev *dev) |
| 2868 | { | 2890 | { |
| 2891 | #ifndef PCI_DISABLE_MWI | ||
| 2869 | u16 cmd; | 2892 | u16 cmd; |
| 2870 | 2893 | ||
| 2871 | pci_read_config_word(dev, PCI_COMMAND, &cmd); | 2894 | pci_read_config_word(dev, PCI_COMMAND, &cmd); |
| @@ -2873,8 +2896,9 @@ pci_clear_mwi(struct pci_dev *dev) | |||
| 2873 | cmd &= ~PCI_COMMAND_INVALIDATE; | 2896 | cmd &= ~PCI_COMMAND_INVALIDATE; |
| 2874 | pci_write_config_word(dev, PCI_COMMAND, cmd); | 2897 | pci_write_config_word(dev, PCI_COMMAND, cmd); |
| 2875 | } | 2898 | } |
| 2899 | #endif | ||
| 2876 | } | 2900 | } |
| 2877 | #endif /* ! PCI_DISABLE_MWI */ | 2901 | EXPORT_SYMBOL(pci_clear_mwi); |
| 2878 | 2902 | ||
| 2879 | /** | 2903 | /** |
| 2880 | * pci_intx - enables/disables PCI INTx for device dev | 2904 | * pci_intx - enables/disables PCI INTx for device dev |
| @@ -2908,6 +2932,7 @@ pci_intx(struct pci_dev *pdev, int enable) | |||
| 2908 | } | 2932 | } |
| 2909 | } | 2933 | } |
| 2910 | } | 2934 | } |
| 2935 | EXPORT_SYMBOL_GPL(pci_intx); | ||
| 2911 | 2936 | ||
| 2912 | /** | 2937 | /** |
| 2913 | * pci_intx_mask_supported - probe for INTx masking support | 2938 | * pci_intx_mask_supported - probe for INTx masking support |
| @@ -4094,6 +4119,7 @@ int pci_select_bars(struct pci_dev *dev, unsigned long flags) | |||
| 4094 | bars |= (1 << i); | 4119 | bars |= (1 << i); |
| 4095 | return bars; | 4120 | return bars; |
| 4096 | } | 4121 | } |
| 4122 | EXPORT_SYMBOL(pci_select_bars); | ||
| 4097 | 4123 | ||
| 4098 | /** | 4124 | /** |
| 4099 | * pci_resource_bar - get position of the BAR associated with a resource | 4125 | * pci_resource_bar - get position of the BAR associated with a resource |
| @@ -4446,41 +4472,3 @@ static int __init pci_setup(char *str) | |||
| 4446 | return 0; | 4472 | return 0; |
| 4447 | } | 4473 | } |
| 4448 | early_param("pci", pci_setup); | 4474 | early_param("pci", pci_setup); |
| 4449 | |||
| 4450 | EXPORT_SYMBOL(pci_reenable_device); | ||
| 4451 | EXPORT_SYMBOL(pci_enable_device_io); | ||
| 4452 | EXPORT_SYMBOL(pci_enable_device_mem); | ||
| 4453 | EXPORT_SYMBOL(pci_enable_device); | ||
| 4454 | EXPORT_SYMBOL(pcim_enable_device); | ||
| 4455 | EXPORT_SYMBOL(pcim_pin_device); | ||
| 4456 | EXPORT_SYMBOL(pci_disable_device); | ||
| 4457 | EXPORT_SYMBOL(pci_find_capability); | ||
| 4458 | EXPORT_SYMBOL(pci_bus_find_capability); | ||
| 4459 | EXPORT_SYMBOL(pci_release_regions); | ||
| 4460 | EXPORT_SYMBOL(pci_request_regions); | ||
| 4461 | EXPORT_SYMBOL(pci_request_regions_exclusive); | ||
| 4462 | EXPORT_SYMBOL(pci_release_region); | ||
| 4463 | EXPORT_SYMBOL(pci_request_region); | ||
| 4464 | EXPORT_SYMBOL(pci_request_region_exclusive); | ||
| 4465 | EXPORT_SYMBOL(pci_release_selected_regions); | ||
| 4466 | EXPORT_SYMBOL(pci_request_selected_regions); | ||
| 4467 | EXPORT_SYMBOL(pci_request_selected_regions_exclusive); | ||
| 4468 | EXPORT_SYMBOL(pci_set_master); | ||
| 4469 | EXPORT_SYMBOL(pci_clear_master); | ||
| 4470 | EXPORT_SYMBOL(pci_set_mwi); | ||
| 4471 | EXPORT_SYMBOL(pci_try_set_mwi); | ||
| 4472 | EXPORT_SYMBOL(pci_clear_mwi); | ||
| 4473 | EXPORT_SYMBOL_GPL(pci_intx); | ||
| 4474 | EXPORT_SYMBOL(pci_assign_resource); | ||
| 4475 | EXPORT_SYMBOL(pci_find_parent_resource); | ||
| 4476 | EXPORT_SYMBOL(pci_select_bars); | ||
| 4477 | |||
| 4478 | EXPORT_SYMBOL(pci_set_power_state); | ||
| 4479 | EXPORT_SYMBOL(pci_save_state); | ||
| 4480 | EXPORT_SYMBOL(pci_restore_state); | ||
| 4481 | EXPORT_SYMBOL(pci_pme_capable); | ||
| 4482 | EXPORT_SYMBOL(pci_pme_active); | ||
| 4483 | EXPORT_SYMBOL(pci_wake_from_d3); | ||
| 4484 | EXPORT_SYMBOL(pci_prepare_to_sleep); | ||
| 4485 | EXPORT_SYMBOL(pci_back_from_sleep); | ||
| 4486 | EXPORT_SYMBOL_GPL(pci_set_pcie_reset_state); | ||
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 2bbf5221afb3..96b954f55d0d 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
| @@ -741,6 +741,7 @@ struct pci_bus *pci_add_new_bus(struct pci_bus *parent, struct pci_dev *dev, int | |||
| 741 | } | 741 | } |
| 742 | return child; | 742 | return child; |
| 743 | } | 743 | } |
| 744 | EXPORT_SYMBOL(pci_add_new_bus); | ||
| 744 | 745 | ||
| 745 | /* | 746 | /* |
| 746 | * If it's a bridge, configure it and scan the bus behind it. | 747 | * If it's a bridge, configure it and scan the bus behind it. |
| @@ -952,6 +953,7 @@ out: | |||
| 952 | 953 | ||
| 953 | return max; | 954 | return max; |
| 954 | } | 955 | } |
| 956 | EXPORT_SYMBOL(pci_scan_bridge); | ||
| 955 | 957 | ||
| 956 | /* | 958 | /* |
| 957 | * Read interrupt line and base address registers. | 959 | * Read interrupt line and base address registers. |
| @@ -1519,6 +1521,7 @@ int pci_scan_slot(struct pci_bus *bus, int devfn) | |||
| 1519 | 1521 | ||
| 1520 | return nr; | 1522 | return nr; |
| 1521 | } | 1523 | } |
| 1524 | EXPORT_SYMBOL(pci_scan_slot); | ||
| 1522 | 1525 | ||
| 1523 | static int pcie_find_smpss(struct pci_dev *dev, void *data) | 1526 | static int pcie_find_smpss(struct pci_dev *dev, void *data) |
| 1524 | { | 1527 | { |
| @@ -1732,6 +1735,7 @@ unsigned int pci_scan_child_bus(struct pci_bus *bus) | |||
| 1732 | dev_dbg(&bus->dev, "bus scan returning with max=%02x\n", max); | 1735 | dev_dbg(&bus->dev, "bus scan returning with max=%02x\n", max); |
| 1733 | return max; | 1736 | return max; |
| 1734 | } | 1737 | } |
| 1738 | EXPORT_SYMBOL_GPL(pci_scan_child_bus); | ||
| 1735 | 1739 | ||
| 1736 | /** | 1740 | /** |
| 1737 | * pcibios_root_bridge_prepare - Platform-specific host bridge setup. | 1741 | * pcibios_root_bridge_prepare - Platform-specific host bridge setup. |
| @@ -2040,11 +2044,6 @@ unsigned int pci_rescan_bus(struct pci_bus *bus) | |||
| 2040 | } | 2044 | } |
| 2041 | EXPORT_SYMBOL_GPL(pci_rescan_bus); | 2045 | EXPORT_SYMBOL_GPL(pci_rescan_bus); |
| 2042 | 2046 | ||
| 2043 | EXPORT_SYMBOL(pci_add_new_bus); | ||
| 2044 | EXPORT_SYMBOL(pci_scan_slot); | ||
| 2045 | EXPORT_SYMBOL(pci_scan_bridge); | ||
| 2046 | EXPORT_SYMBOL_GPL(pci_scan_child_bus); | ||
| 2047 | |||
| 2048 | /* | 2047 | /* |
| 2049 | * pci_rescan_bus(), pci_rescan_bus_bridge_resize() and PCI device removal | 2048 | * pci_rescan_bus(), pci_rescan_bus_bridge_resize() and PCI device removal |
| 2050 | * routines should always be executed under this mutex. | 2049 | * routines should always be executed under this mutex. |
diff --git a/drivers/pci/rom.c b/drivers/pci/rom.c index c1839450d4d6..7fdd2200c9cb 100644 --- a/drivers/pci/rom.c +++ b/drivers/pci/rom.c | |||
| @@ -38,6 +38,7 @@ int pci_enable_rom(struct pci_dev *pdev) | |||
| 38 | pci_write_config_dword(pdev, pdev->rom_base_reg, rom_addr); | 38 | pci_write_config_dword(pdev, pdev->rom_base_reg, rom_addr); |
| 39 | return 0; | 39 | return 0; |
| 40 | } | 40 | } |
| 41 | EXPORT_SYMBOL_GPL(pci_enable_rom); | ||
| 41 | 42 | ||
| 42 | /** | 43 | /** |
| 43 | * pci_disable_rom - disable ROM decoding for a PCI device | 44 | * pci_disable_rom - disable ROM decoding for a PCI device |
| @@ -53,6 +54,7 @@ void pci_disable_rom(struct pci_dev *pdev) | |||
| 53 | rom_addr &= ~PCI_ROM_ADDRESS_ENABLE; | 54 | rom_addr &= ~PCI_ROM_ADDRESS_ENABLE; |
| 54 | pci_write_config_dword(pdev, pdev->rom_base_reg, rom_addr); | 55 | pci_write_config_dword(pdev, pdev->rom_base_reg, rom_addr); |
| 55 | } | 56 | } |
| 57 | EXPORT_SYMBOL_GPL(pci_disable_rom); | ||
| 56 | 58 | ||
| 57 | /** | 59 | /** |
| 58 | * pci_get_rom_size - obtain the actual size of the ROM image | 60 | * pci_get_rom_size - obtain the actual size of the ROM image |
| @@ -166,6 +168,7 @@ void __iomem *pci_map_rom(struct pci_dev *pdev, size_t *size) | |||
| 166 | *size = pci_get_rom_size(pdev, rom, *size); | 168 | *size = pci_get_rom_size(pdev, rom, *size); |
| 167 | return rom; | 169 | return rom; |
| 168 | } | 170 | } |
| 171 | EXPORT_SYMBOL(pci_map_rom); | ||
| 169 | 172 | ||
| 170 | /** | 173 | /** |
| 171 | * pci_unmap_rom - unmap the ROM from kernel space | 174 | * pci_unmap_rom - unmap the ROM from kernel space |
| @@ -187,6 +190,7 @@ void pci_unmap_rom(struct pci_dev *pdev, void __iomem *rom) | |||
| 187 | if (!(res->flags & (IORESOURCE_ROM_ENABLE | IORESOURCE_ROM_SHADOW))) | 190 | if (!(res->flags & (IORESOURCE_ROM_ENABLE | IORESOURCE_ROM_SHADOW))) |
| 188 | pci_disable_rom(pdev); | 191 | pci_disable_rom(pdev); |
| 189 | } | 192 | } |
| 193 | EXPORT_SYMBOL(pci_unmap_rom); | ||
| 190 | 194 | ||
| 191 | /** | 195 | /** |
| 192 | * pci_cleanup_rom - free the ROM copy created by pci_map_rom_copy | 196 | * pci_cleanup_rom - free the ROM copy created by pci_map_rom_copy |
| @@ -222,9 +226,4 @@ void __iomem *pci_platform_rom(struct pci_dev *pdev, size_t *size) | |||
| 222 | 226 | ||
| 223 | return NULL; | 227 | return NULL; |
| 224 | } | 228 | } |
| 225 | |||
| 226 | EXPORT_SYMBOL(pci_map_rom); | ||
| 227 | EXPORT_SYMBOL(pci_unmap_rom); | ||
| 228 | EXPORT_SYMBOL_GPL(pci_enable_rom); | ||
| 229 | EXPORT_SYMBOL_GPL(pci_disable_rom); | ||
| 230 | EXPORT_SYMBOL(pci_platform_rom); | 229 | EXPORT_SYMBOL(pci_platform_rom); |
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index 0e9a00e5ca60..a66ed7525841 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
| @@ -177,6 +177,7 @@ struct pci_bus * pci_find_bus(int domain, int busnr) | |||
| 177 | } | 177 | } |
| 178 | return NULL; | 178 | return NULL; |
| 179 | } | 179 | } |
| 180 | EXPORT_SYMBOL(pci_find_bus); | ||
| 180 | 181 | ||
| 181 | /** | 182 | /** |
| 182 | * pci_find_next_bus - begin or continue searching for a PCI bus | 183 | * pci_find_next_bus - begin or continue searching for a PCI bus |
| @@ -201,6 +202,7 @@ pci_find_next_bus(const struct pci_bus *from) | |||
| 201 | up_read(&pci_bus_sem); | 202 | up_read(&pci_bus_sem); |
| 202 | return b; | 203 | return b; |
| 203 | } | 204 | } |
| 205 | EXPORT_SYMBOL(pci_find_next_bus); | ||
| 204 | 206 | ||
| 205 | /** | 207 | /** |
| 206 | * pci_get_slot - locate PCI device for a given PCI slot | 208 | * pci_get_slot - locate PCI device for a given PCI slot |
| @@ -234,6 +236,7 @@ struct pci_dev *pci_get_slot(struct pci_bus *bus, unsigned int devfn) | |||
| 234 | up_read(&pci_bus_sem); | 236 | up_read(&pci_bus_sem); |
| 235 | return dev; | 237 | return dev; |
| 236 | } | 238 | } |
| 239 | EXPORT_SYMBOL(pci_get_slot); | ||
| 237 | 240 | ||
| 238 | /** | 241 | /** |
| 239 | * pci_get_domain_bus_and_slot - locate PCI device for a given PCI domain (segment), bus, and slot | 242 | * pci_get_domain_bus_and_slot - locate PCI device for a given PCI domain (segment), bus, and slot |
| @@ -338,6 +341,7 @@ struct pci_dev *pci_get_subsys(unsigned int vendor, unsigned int device, | |||
| 338 | 341 | ||
| 339 | return pci_get_dev_by_id(&id, from); | 342 | return pci_get_dev_by_id(&id, from); |
| 340 | } | 343 | } |
| 344 | EXPORT_SYMBOL(pci_get_subsys); | ||
| 341 | 345 | ||
| 342 | /** | 346 | /** |
| 343 | * pci_get_device - begin or continue searching for a PCI device by vendor/device id | 347 | * pci_get_device - begin or continue searching for a PCI device by vendor/device id |
| @@ -358,6 +362,7 @@ pci_get_device(unsigned int vendor, unsigned int device, struct pci_dev *from) | |||
| 358 | { | 362 | { |
| 359 | return pci_get_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from); | 363 | return pci_get_subsys(vendor, device, PCI_ANY_ID, PCI_ANY_ID, from); |
| 360 | } | 364 | } |
| 365 | EXPORT_SYMBOL(pci_get_device); | ||
| 361 | 366 | ||
| 362 | /** | 367 | /** |
| 363 | * pci_get_class - begin or continue searching for a PCI device by class | 368 | * pci_get_class - begin or continue searching for a PCI device by class |
| @@ -386,6 +391,7 @@ struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from) | |||
| 386 | 391 | ||
| 387 | return pci_get_dev_by_id(&id, from); | 392 | return pci_get_dev_by_id(&id, from); |
| 388 | } | 393 | } |
| 394 | EXPORT_SYMBOL(pci_get_class); | ||
| 389 | 395 | ||
| 390 | /** | 396 | /** |
| 391 | * pci_dev_present - Returns 1 if device matching the device list is present, 0 if not. | 397 | * pci_dev_present - Returns 1 if device matching the device list is present, 0 if not. |
| @@ -415,12 +421,3 @@ int pci_dev_present(const struct pci_device_id *ids) | |||
| 415 | return 0; | 421 | return 0; |
| 416 | } | 422 | } |
| 417 | EXPORT_SYMBOL(pci_dev_present); | 423 | EXPORT_SYMBOL(pci_dev_present); |
| 418 | |||
| 419 | /* For boot time work */ | ||
| 420 | EXPORT_SYMBOL(pci_find_bus); | ||
| 421 | EXPORT_SYMBOL(pci_find_next_bus); | ||
| 422 | /* For everyone */ | ||
| 423 | EXPORT_SYMBOL(pci_get_device); | ||
| 424 | EXPORT_SYMBOL(pci_get_subsys); | ||
| 425 | EXPORT_SYMBOL(pci_get_slot); | ||
| 426 | EXPORT_SYMBOL(pci_get_class); | ||
diff --git a/drivers/pci/setup-res.c b/drivers/pci/setup-res.c index 33f9e32d94d0..211b36f96ff3 100644 --- a/drivers/pci/setup-res.c +++ b/drivers/pci/setup-res.c | |||
| @@ -314,6 +314,7 @@ int pci_assign_resource(struct pci_dev *dev, int resno) | |||
| 314 | } | 314 | } |
| 315 | return ret; | 315 | return ret; |
| 316 | } | 316 | } |
| 317 | EXPORT_SYMBOL(pci_assign_resource); | ||
| 317 | 318 | ||
| 318 | int pci_reassign_resource(struct pci_dev *dev, int resno, resource_size_t addsize, | 319 | int pci_reassign_resource(struct pci_dev *dev, int resno, resource_size_t addsize, |
| 319 | resource_size_t min_align) | 320 | resource_size_t min_align) |
