summaryrefslogtreecommitdiff
path: root/arch/xtensa
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-01-01 16:40:49 (GMT)
committerJesse Barnes <jbarnes@virtuousgeek.org>2010-02-23 00:16:56 (GMT)
commitb26b2d494b659f988b4d75eb394dfa0ddac415c9 (patch)
treed262f333e529a21017dc072e604a626b38520515 /arch/xtensa
parent93da6202264ce1256b04db8008a43882ae62d060 (diff)
downloadlinux-b26b2d494b659f988b4d75eb394dfa0ddac415c9.tar.xz
resource/PCI: align functions now return start of resource
As suggested by Linus, align functions should return the start of a resource, not void. An update of "res->start" is no longer necessary. Cc: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/xtensa')
-rw-r--r--arch/xtensa/kernel/pci.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/xtensa/kernel/pci.c b/arch/xtensa/kernel/pci.c
index b7c0734..d7efab0 100644
--- a/arch/xtensa/kernel/pci.c
+++ b/arch/xtensa/kernel/pci.c
@@ -69,26 +69,25 @@ static int pci_bus_count;
* but we want to try to avoid allocating at 0x2900-0x2bff
* which might have be mirrored at 0x0100-0x03ff..
*/
-void
+resource_size_t
pcibios_align_resource(void *data, struct resource *res, resource_size_t size,
resource_size_t align)
{
struct pci_dev *dev = data;
+ resource_size_t start = res->start;
if (res->flags & IORESOURCE_IO) {
- resource_size_t start = res->start;
-
if (size > 0x100) {
printk(KERN_ERR "PCI: I/O Region %s/%d too large"
" (%ld bytes)\n", pci_name(dev),
dev->resource - res, size);
}
- if (start & 0x300) {
+ if (start & 0x300)
start = (start + 0x3ff) & ~0x3ff;
- res->start = start;
- }
}
+
+ return start;
}
int