aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorZhao, Yu <yu.zhao@intel.com>2008-10-13 07:18:07 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-10-20 13:54:29 -0400
commit557848c3c03ad1d1e66cb3b5b06698e3a9ebc33c (patch)
treef244d69c332d3bbbef9f924fb1f0892abba7e1ff /drivers/pci/probe.c
parent022edd86d7c864bc8fadc3c8ac4e6a464472ab05 (diff)
PCI: replace cfg space size (256/4096) by macros.
This is a cleanup that changes all PCI configuration space size representations to the macros (PCI_CFG_SPACE_SIZE and PCI_CFG_SPACE_EXP_SIZE). And the macros are also moved from drivers/pci/probe.c to drivers/pci/pci.h. Signed-off-by: Yu Zhao <yu.zhao@intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 7aa71636dd3c..f6754e87f046 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -14,8 +14,6 @@
14 14
15#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */ 15#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */
16#define CARDBUS_RESERVE_BUSNR 3 16#define CARDBUS_RESERVE_BUSNR 3
17#define PCI_CFG_SPACE_SIZE 256
18#define PCI_CFG_SPACE_EXP_SIZE 4096
19 17
20/* Ugh. Need to stop exporting this to modules. */ 18/* Ugh. Need to stop exporting this to modules. */
21LIST_HEAD(pci_root_buses); 19LIST_HEAD(pci_root_buses);
@@ -887,8 +885,9 @@ static void set_pcie_port_type(struct pci_dev *pdev)
887int pci_cfg_space_size_ext(struct pci_dev *dev) 885int pci_cfg_space_size_ext(struct pci_dev *dev)
888{ 886{
889 u32 status; 887 u32 status;
888 int pos = PCI_CFG_SPACE_SIZE;
890 889
891 if (pci_read_config_dword(dev, 256, &status) != PCIBIOS_SUCCESSFUL) 890 if (pci_read_config_dword(dev, pos, &status) != PCIBIOS_SUCCESSFUL)
892 goto fail; 891 goto fail;
893 if (status == 0xffffffff) 892 if (status == 0xffffffff)
894 goto fail; 893 goto fail;