diff options
author | Magnus Damm <damm@igel.co.jp> | 2008-07-29 22:32:57 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-30 09:41:43 -0700 |
commit | 1a4e564b7db999fbe5d88318c96ac8747699d417 (patch) | |
tree | 6451a0bd33533f7a214faa205ad174978458781e /kernel | |
parent | e958d3ace7791f33518f0259cd3cf229408b135c (diff) | |
download | blackbird-op-linux-1a4e564b7db999fbe5d88318c96ac8747699d417.tar.gz blackbird-op-linux-1a4e564b7db999fbe5d88318c96ac8747699d417.zip |
resource: add resource_size()
Avoid one-off errors by introducing a resource_size() function.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/resource.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/resource.c b/kernel/resource.c index 74af2d7cb5a1..f5b518eabefe 100644 --- a/kernel/resource.c +++ b/kernel/resource.c @@ -490,7 +490,7 @@ resource_size_t resource_alignment(struct resource *res) { switch (res->flags & (IORESOURCE_SIZEALIGN | IORESOURCE_STARTALIGN)) { case IORESOURCE_SIZEALIGN: - return res->end - res->start + 1; + return resource_size(res); case IORESOURCE_STARTALIGN: return res->start; default: |