diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-01-01 11:40:49 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-02-22 19:16:56 -0500 |
commit | b26b2d494b659f988b4d75eb394dfa0ddac415c9 (patch) | |
tree | d262f333e529a21017dc072e604a626b38520515 /arch/arm/kernel | |
parent | 93da6202264ce1256b04db8008a43882ae62d060 (diff) |
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/arm/kernel')
-rw-r--r-- | arch/arm/kernel/bios32.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index 809681900ec8..a7c85f84f06c 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c | |||
@@ -616,15 +616,17 @@ char * __init pcibios_setup(char *str) | |||
616 | * but we want to try to avoid allocating at 0x2900-0x2bff | 616 | * but we want to try to avoid allocating at 0x2900-0x2bff |
617 | * which might be mirrored at 0x0100-0x03ff.. | 617 | * which might be mirrored at 0x0100-0x03ff.. |
618 | */ | 618 | */ |
619 | void pcibios_align_resource(void *data, struct resource *res, | 619 | resource_size_t pcibios_align_resource(void *data, struct resource *res, |
620 | resource_size_t size, resource_size_t align) | 620 | resource_size_t size, resource_size_t align) |
621 | { | 621 | { |
622 | resource_size_t start = res->start; | 622 | resource_size_t start = res->start; |
623 | 623 | ||
624 | if (res->flags & IORESOURCE_IO && start & 0x300) | 624 | if (res->flags & IORESOURCE_IO && start & 0x300) |
625 | start = (start + 0x3ff) & ~0x3ff; | 625 | start = (start + 0x3ff) & ~0x3ff; |
626 | 626 | ||
627 | res->start = (start + align - 1) & ~(align - 1); | 627 | start = (start + align - 1) & ~(align - 1); |
628 | |||
629 | return start; | ||
628 | } | 630 | } |
629 | 631 | ||
630 | /** | 632 | /** |