diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-10 00:58:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-10 00:58:10 -0500 |
commit | 117430b1fa3ae0b0bd981226bdb0c5412729c1db (patch) | |
tree | f1209f5705d1ba55d88f5a1e17b82382c8b460d0 /drivers | |
parent | 2695cf412f07f394587e7901cb3b4e9b66d25051 (diff) | |
parent | 128bf5cb54dececc5209db65f8ef5d17d74244d9 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6:
pci: fix section mismatch warning
PCI: aer: fix section mismatch warning
pcie: fix section mismatch warning
PCI: allow multiple calls to pcim_pin_device()
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/pci.c | 15 | ||||
-rw-r--r-- | drivers/pci/pcie/aer/aerdrv.c | 6 | ||||
-rw-r--r-- | drivers/pci/pcie/portdrv_pci.c | 6 | ||||
-rw-r--r-- | drivers/pci/search.c | 2 |
4 files changed, 15 insertions, 14 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index df495300ce3d..a32db0628157 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -757,7 +757,8 @@ int pci_enable_device(struct pci_dev *dev) | |||
757 | * when a device is enabled using managed PCI device enable interface. | 757 | * when a device is enabled using managed PCI device enable interface. |
758 | */ | 758 | */ |
759 | struct pci_devres { | 759 | struct pci_devres { |
760 | unsigned int disable:1; | 760 | unsigned int enabled:1; |
761 | unsigned int pinned:1; | ||
761 | unsigned int orig_intx:1; | 762 | unsigned int orig_intx:1; |
762 | unsigned int restore_intx:1; | 763 | unsigned int restore_intx:1; |
763 | u32 region_mask; | 764 | u32 region_mask; |
@@ -781,7 +782,7 @@ static void pcim_release(struct device *gendev, void *res) | |||
781 | if (this->restore_intx) | 782 | if (this->restore_intx) |
782 | pci_intx(dev, this->orig_intx); | 783 | pci_intx(dev, this->orig_intx); |
783 | 784 | ||
784 | if (this->disable) | 785 | if (this->enabled && !this->pinned) |
785 | pci_disable_device(dev); | 786 | pci_disable_device(dev); |
786 | } | 787 | } |
787 | 788 | ||
@@ -820,12 +821,12 @@ int pcim_enable_device(struct pci_dev *pdev) | |||
820 | dr = get_pci_dr(pdev); | 821 | dr = get_pci_dr(pdev); |
821 | if (unlikely(!dr)) | 822 | if (unlikely(!dr)) |
822 | return -ENOMEM; | 823 | return -ENOMEM; |
823 | WARN_ON(!!dr->disable); | 824 | WARN_ON(!!dr->enabled); |
824 | 825 | ||
825 | rc = pci_enable_device(pdev); | 826 | rc = pci_enable_device(pdev); |
826 | if (!rc) { | 827 | if (!rc) { |
827 | pdev->is_managed = 1; | 828 | pdev->is_managed = 1; |
828 | dr->disable = 1; | 829 | dr->enabled = 1; |
829 | } | 830 | } |
830 | return rc; | 831 | return rc; |
831 | } | 832 | } |
@@ -843,9 +844,9 @@ void pcim_pin_device(struct pci_dev *pdev) | |||
843 | struct pci_devres *dr; | 844 | struct pci_devres *dr; |
844 | 845 | ||
845 | dr = find_pci_dr(pdev); | 846 | dr = find_pci_dr(pdev); |
846 | WARN_ON(!dr || !dr->disable); | 847 | WARN_ON(!dr || !dr->enabled); |
847 | if (dr) | 848 | if (dr) |
848 | dr->disable = 0; | 849 | dr->pinned = 1; |
849 | } | 850 | } |
850 | 851 | ||
851 | /** | 852 | /** |
@@ -876,7 +877,7 @@ pci_disable_device(struct pci_dev *dev) | |||
876 | 877 | ||
877 | dr = find_pci_dr(dev); | 878 | dr = find_pci_dr(dev); |
878 | if (dr) | 879 | if (dr) |
879 | dr->disable = 0; | 880 | dr->enabled = 0; |
880 | 881 | ||
881 | if (atomic_sub_return(1, &dev->enable_cnt) != 0) | 882 | if (atomic_sub_return(1, &dev->enable_cnt) != 0) |
882 | return; | 883 | return; |
diff --git a/drivers/pci/pcie/aer/aerdrv.c b/drivers/pci/pcie/aer/aerdrv.c index b164de050d4f..db6ad8e763ac 100644 --- a/drivers/pci/pcie/aer/aerdrv.c +++ b/drivers/pci/pcie/aer/aerdrv.c | |||
@@ -66,7 +66,7 @@ static struct pci_error_handlers aer_error_handlers = { | |||
66 | .resume = aer_error_resume, | 66 | .resume = aer_error_resume, |
67 | }; | 67 | }; |
68 | 68 | ||
69 | static struct pcie_port_service_driver aerdrv = { | 69 | static struct pcie_port_service_driver aerdriver = { |
70 | .name = "aer", | 70 | .name = "aer", |
71 | .id_table = &aer_id[0], | 71 | .id_table = &aer_id[0], |
72 | 72 | ||
@@ -328,7 +328,7 @@ static void aer_error_resume(struct pci_dev *dev) | |||
328 | **/ | 328 | **/ |
329 | static int __init aer_service_init(void) | 329 | static int __init aer_service_init(void) |
330 | { | 330 | { |
331 | return pcie_port_service_register(&aerdrv); | 331 | return pcie_port_service_register(&aerdriver); |
332 | } | 332 | } |
333 | 333 | ||
334 | /** | 334 | /** |
@@ -338,7 +338,7 @@ static int __init aer_service_init(void) | |||
338 | **/ | 338 | **/ |
339 | static void __exit aer_service_exit(void) | 339 | static void __exit aer_service_exit(void) |
340 | { | 340 | { |
341 | pcie_port_service_unregister(&aerdrv); | 341 | pcie_port_service_unregister(&aerdriver); |
342 | } | 342 | } |
343 | 343 | ||
344 | module_init(aer_service_init); | 344 | module_init(aer_service_init); |
diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index f17e7ed2b2a5..0be5a0b30725 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c | |||
@@ -276,7 +276,7 @@ static struct pci_error_handlers pcie_portdrv_err_handler = { | |||
276 | .resume = pcie_portdrv_err_resume, | 276 | .resume = pcie_portdrv_err_resume, |
277 | }; | 277 | }; |
278 | 278 | ||
279 | static struct pci_driver pcie_portdrv = { | 279 | static struct pci_driver pcie_portdriver = { |
280 | .name = (char *)device_name, | 280 | .name = (char *)device_name, |
281 | .id_table = &port_pci_ids[0], | 281 | .id_table = &port_pci_ids[0], |
282 | 282 | ||
@@ -298,7 +298,7 @@ static int __init pcie_portdrv_init(void) | |||
298 | printk(KERN_WARNING "PCIE: bus_register error: %d\n", retval); | 298 | printk(KERN_WARNING "PCIE: bus_register error: %d\n", retval); |
299 | goto out; | 299 | goto out; |
300 | } | 300 | } |
301 | retval = pci_register_driver(&pcie_portdrv); | 301 | retval = pci_register_driver(&pcie_portdriver); |
302 | if (retval) | 302 | if (retval) |
303 | pcie_port_bus_unregister(); | 303 | pcie_port_bus_unregister(); |
304 | out: | 304 | out: |
@@ -307,7 +307,7 @@ static int __init pcie_portdrv_init(void) | |||
307 | 307 | ||
308 | static void __exit pcie_portdrv_exit(void) | 308 | static void __exit pcie_portdrv_exit(void) |
309 | { | 309 | { |
310 | pci_unregister_driver(&pcie_portdrv); | 310 | pci_unregister_driver(&pcie_portdriver); |
311 | pcie_port_bus_unregister(); | 311 | pcie_port_bus_unregister(); |
312 | } | 312 | } |
313 | 313 | ||
diff --git a/drivers/pci/search.c b/drivers/pci/search.c index ff98eaddaa73..2dd8681d6b31 100644 --- a/drivers/pci/search.c +++ b/drivers/pci/search.c | |||
@@ -15,7 +15,7 @@ | |||
15 | 15 | ||
16 | DECLARE_RWSEM(pci_bus_sem); | 16 | DECLARE_RWSEM(pci_bus_sem); |
17 | 17 | ||
18 | static struct pci_bus * __devinit | 18 | static struct pci_bus * |
19 | pci_do_find_bus(struct pci_bus* bus, unsigned char busnr) | 19 | pci_do_find_bus(struct pci_bus* bus, unsigned char busnr) |
20 | { | 20 | { |
21 | struct pci_bus* child; | 21 | struct pci_bus* child; |