diff options
author | Zhao, Yu <yu.zhao@intel.com> | 2008-10-13 13:18:07 +0200 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-10-20 19:54:29 +0200 |
commit | 557848c3c03ad1d1e66cb3b5b06698e3a9ebc33c (patch) | |
tree | f244d69c332d3bbbef9f924fb1f0892abba7e1ff /drivers/pci/probe.c | |
parent | PCI: use resource_size() everywhere. (diff) | |
download | linux-557848c3c03ad1d1e66cb3b5b06698e3a9ebc33c.tar.xz linux-557848c3c03ad1d1e66cb3b5b06698e3a9ebc33c.zip |
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.c | 5 |
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 @@ #define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */ #define CARDBUS_RESERVE_BUSNR 3 -#define PCI_CFG_SPACE_SIZE 256 -#define PCI_CFG_SPACE_EXP_SIZE 4096 /* Ugh. Need to stop exporting this to modules. */ LIST_HEAD(pci_root_buses); @@ -887,8 +885,9 @@ static void set_pcie_port_type(struct pci_dev *pdev) int pci_cfg_space_size_ext(struct pci_dev *dev) { u32 status; + int pos = PCI_CFG_SPACE_SIZE; - if (pci_read_config_dword(dev, 256, &status) != PCIBIOS_SUCCESSFUL) + if (pci_read_config_dword(dev, pos, &status) != PCIBIOS_SUCCESSFUL) goto fail; if (status == 0xffffffff) goto fail; |