diff options
author | Taku Izumi <izumi.taku@jp.fujitsu.com> | 2012-10-30 02:26:18 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2012-11-07 11:43:28 -0500 |
commit | 642c92da36ae0bed3c31fdd408411ab95f4e326b (patch) | |
tree | 28519422f156133241851c29dac86ed451e00018 | |
parent | d4761ba2d6adbe24c792ec6223a5884ae4e82430 (diff) |
PCI: Don't pass pci_dev to pci_ext_cfg_avail()
pci_ext_cfg_avail() doesn't use the "struct pci_dev *" passed to
it, and there's no requirement that a host bridge even be represented
by a pci_dev. This drops the pci_ext_cfg_avail() parameter.
[bhelgaas: changelog]
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-rw-r--r-- | arch/x86/pci/common.c | 2 | ||||
-rw-r--r-- | drivers/acpi/pci_root.c | 2 | ||||
-rw-r--r-- | drivers/pci/pci.c | 5 | ||||
-rw-r--r-- | include/linux/pci.h | 2 |
4 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c index 720e973fc34a..52dbf1aeeb63 100644 --- a/arch/x86/pci/common.c +++ b/arch/x86/pci/common.c | |||
@@ -626,7 +626,7 @@ void pcibios_disable_device (struct pci_dev *dev) | |||
626 | pcibios_disable_irq(dev); | 626 | pcibios_disable_irq(dev); |
627 | } | 627 | } |
628 | 628 | ||
629 | int pci_ext_cfg_avail(struct pci_dev *dev) | 629 | int pci_ext_cfg_avail(void) |
630 | { | 630 | { |
631 | if (raw_pci_ext_ops) | 631 | if (raw_pci_ext_ops) |
632 | return 1; | 632 | return 1; |
diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 66f3ae74d130..50f329d7ccff 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c | |||
@@ -564,7 +564,7 @@ static int __devinit acpi_pci_root_add(struct acpi_device *device) | |||
564 | acpi_pci_bridge_scan(child); | 564 | acpi_pci_bridge_scan(child); |
565 | 565 | ||
566 | /* Indicate support for various _OSC capabilities. */ | 566 | /* Indicate support for various _OSC capabilities. */ |
567 | if (pci_ext_cfg_avail(root->bus->self)) | 567 | if (pci_ext_cfg_avail()) |
568 | flags |= OSC_EXT_PCI_CONFIG_SUPPORT; | 568 | flags |= OSC_EXT_PCI_CONFIG_SUPPORT; |
569 | if (pcie_aspm_support_enabled()) | 569 | if (pcie_aspm_support_enabled()) |
570 | flags |= OSC_ACTIVE_STATE_PWR_SUPPORT | | 570 | flags |= OSC_ACTIVE_STATE_PWR_SUPPORT | |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 54858838f098..01b68bfa2321 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
@@ -3833,14 +3833,13 @@ static void __devinit pci_no_domains(void) | |||
3833 | } | 3833 | } |
3834 | 3834 | ||
3835 | /** | 3835 | /** |
3836 | * pci_ext_cfg_enabled - can we access extended PCI config space? | 3836 | * pci_ext_cfg_avail - can we access extended PCI config space? |
3837 | * @dev: The PCI device of the root bridge. | ||
3838 | * | 3837 | * |
3839 | * Returns 1 if we can access PCI extended config space (offsets | 3838 | * Returns 1 if we can access PCI extended config space (offsets |
3840 | * greater than 0xff). This is the default implementation. Architecture | 3839 | * greater than 0xff). This is the default implementation. Architecture |
3841 | * implementations can override this. | 3840 | * implementations can override this. |
3842 | */ | 3841 | */ |
3843 | int __weak pci_ext_cfg_avail(struct pci_dev *dev) | 3842 | int __weak pci_ext_cfg_avail(void) |
3844 | { | 3843 | { |
3845 | return 1; | 3844 | return 1; |
3846 | } | 3845 | } |
diff --git a/include/linux/pci.h b/include/linux/pci.h index 786094254d57..9253af697ca4 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1604,7 +1604,7 @@ static inline void pci_mmcfg_early_init(void) { } | |||
1604 | static inline void pci_mmcfg_late_init(void) { } | 1604 | static inline void pci_mmcfg_late_init(void) { } |
1605 | #endif | 1605 | #endif |
1606 | 1606 | ||
1607 | int pci_ext_cfg_avail(struct pci_dev *dev); | 1607 | int pci_ext_cfg_avail(void); |
1608 | 1608 | ||
1609 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); | 1609 | void __iomem *pci_ioremap_bar(struct pci_dev *pdev, int bar); |
1610 | 1610 | ||