diff options
author | Yinghai Lu <yinghai@kernel.org> | 2012-09-17 22:25:35 -0700 |
---|---|---|
committer | Yinghai Lu <yinghai@kernel.org> | 2012-09-17 22:25:35 -0700 |
commit | 713695faf3aacad7e47620e3e9b8b2c8c1060644 (patch) | |
tree | c5f885d55292bea8b0955cd6ca3bbc1d57e7ebb4 | |
parent | f4f613dbfa3bda174816a6a6ff0e7442bee105ea (diff) | |
download | linux-yinghai-713695faf3aacad7e47620e3e9b8b2c8c1060644.tar.gz |
PCI: Use is_pci_iov_resource_idx()
So we can remove one ifdef in setup-bus.c. and will share the code in that
ifdef block later.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
-rw-r--r-- | drivers/pci/setup-bus.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 67c2d40b48178f..28e40f43f3beea 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -883,16 +883,15 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, if (r->parent || (r->flags & mask) != type) continue; r_size = resource_size(r); -#ifdef CONFIG_PCI_IOV + /* put SRIOV requested res to the optional list */ - if (realloc_head && i >= PCI_IOV_RESOURCES && - i <= PCI_IOV_RESOURCE_END) { + if (realloc_head && is_pci_iov_resource_idx(i)) { r->end = r->start - 1; add_to_list(realloc_head, dev, r, r_size, 0/* dont' care */); children_add_size += r_size; continue; } -#endif + /* For bridges size != alignment */ align = pci_resource_alignment(dev, r); order = __ffs(align) - 20; |