aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index d2d187916643..bea1ad1ad5ba 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -19,7 +19,6 @@
19#include <asm/dma.h> /* isa_dma_bridge_buggy */ 19#include <asm/dma.h> /* isa_dma_bridge_buggy */
20#include "pci.h" 20#include "pci.h"
21 21
22#if 0
23 22
24/** 23/**
25 * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children 24 * pci_bus_max_busnr - returns maximum PCI bus number of given bus' children
@@ -34,7 +33,7 @@ pci_bus_max_busnr(struct pci_bus* bus)
34 struct list_head *tmp; 33 struct list_head *tmp;
35 unsigned char max, n; 34 unsigned char max, n;
36 35
37 max = bus->number; 36 max = bus->subordinate;
38 list_for_each(tmp, &bus->children) { 37 list_for_each(tmp, &bus->children) {
39 n = pci_bus_max_busnr(pci_bus_b(tmp)); 38 n = pci_bus_max_busnr(pci_bus_b(tmp));
40 if(n > max) 39 if(n > max)
@@ -42,7 +41,9 @@ pci_bus_max_busnr(struct pci_bus* bus)
42 } 41 }
43 return max; 42 return max;
44} 43}
44EXPORT_SYMBOL_GPL(pci_bus_max_busnr);
45 45
46#if 0
46/** 47/**
47 * pci_max_busnr - returns maximum PCI bus number 48 * pci_max_busnr - returns maximum PCI bus number
48 * 49 *
@@ -495,9 +496,8 @@ pci_enable_device_bars(struct pci_dev *dev, int bars)
495int 496int
496pci_enable_device(struct pci_dev *dev) 497pci_enable_device(struct pci_dev *dev)
497{ 498{
498 int err; 499 int err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1);
499 500 if (err)
500 if ((err = pci_enable_device_bars(dev, (1 << PCI_NUM_RESOURCES) - 1)))
501 return err; 501 return err;
502 pci_fixup_device(pci_fixup_enable, dev); 502 pci_fixup_device(pci_fixup_enable, dev);
503 dev->is_enabled = 1; 503 dev->is_enabled = 1;
@@ -639,7 +639,7 @@ void pci_release_region(struct pci_dev *pdev, int bar)
639 * Returns 0 on success, or %EBUSY on error. A warning 639 * Returns 0 on success, or %EBUSY on error. A warning
640 * message is also printed on failure. 640 * message is also printed on failure.
641 */ 641 */
642int pci_request_region(struct pci_dev *pdev, int bar, char *res_name) 642int pci_request_region(struct pci_dev *pdev, int bar, const char *res_name)
643{ 643{
644 if (pci_resource_len(pdev, bar) == 0) 644 if (pci_resource_len(pdev, bar) == 0)
645 return 0; 645 return 0;
@@ -697,7 +697,7 @@ void pci_release_regions(struct pci_dev *pdev)
697 * Returns 0 on success, or %EBUSY on error. A warning 697 * Returns 0 on success, or %EBUSY on error. A warning
698 * message is also printed on failure. 698 * message is also printed on failure.
699 */ 699 */
700int pci_request_regions(struct pci_dev *pdev, char *res_name) 700int pci_request_regions(struct pci_dev *pdev, const char *res_name)
701{ 701{
702 int i; 702 int i;
703 703
@@ -900,8 +900,12 @@ static int __devinit pci_setup(char *str)
900 if (k) 900 if (k)
901 *k++ = 0; 901 *k++ = 0;
902 if (*str && (str = pcibios_setup(str)) && *str) { 902 if (*str && (str = pcibios_setup(str)) && *str) {
903 /* PCI layer options should be handled here */ 903 if (!strcmp(str, "nomsi")) {
904 printk(KERN_ERR "PCI: Unknown option `%s'\n", str); 904 pci_no_msi();
905 } else {
906 printk(KERN_ERR "PCI: Unknown option `%s'\n",
907 str);
908 }
905 } 909 }
906 str = k; 910 str = k;
907 } 911 }