diff options
author | Zhao, Yu <yu.zhao@intel.com> | 2008-10-13 19:24:28 +0800 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2008-10-20 10:54:28 -0700 |
commit | 022edd86d7c864bc8fadc3c8ac4e6a464472ab05 (patch) | |
tree | 6495a6f473837f1c880c052d76ff9358de76297d /drivers/pci/setup-bus.c | |
parent | c322b28a04c084a467a862766f74c40c917a721c (diff) | |
download | talos-obmc-linux-022edd86d7c864bc8fadc3c8ac4e6a464472ab05.tar.gz talos-obmc-linux-022edd86d7c864bc8fadc3c8ac4e6a464472ab05.zip |
PCI: use resource_size() everywhere.
This is a cleanup that replaces the resource calculation formula with
resource_size().
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/setup-bus.c')
-rw-r--r-- | drivers/pci/setup-bus.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 471a429d7a20..ea979f2bc6db 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -299,7 +299,7 @@ static void pbus_size_io(struct pci_bus *bus) if (r->parent || !(r->flags & IORESOURCE_IO)) continue; - r_size = r->end - r->start + 1; + r_size = resource_size(r); if (r_size < 0x400) /* Might be re-aligned for ISA */ @@ -350,7 +350,7 @@ static int pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long if (r->parent || (r->flags & mask) != type) continue; - r_size = r->end - r->start + 1; + r_size = resource_size(r); /* For bridges size != alignment */ align = resource_alignment(r); order = __ffs(align) - 20; |