summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/macio.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/include/asm/macio.h')
-rw-r--r--arch/powerpc/include/asm/macio.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/include/asm/macio.h b/arch/powerpc/include/asm/macio.h
index 7ab82c825a03..27af7f8bbb8d 100644
--- a/arch/powerpc/include/asm/macio.h
+++ b/arch/powerpc/include/asm/macio.h
@@ -76,7 +76,7 @@ static inline unsigned long macio_resource_len(struct macio_dev *dev, int resour
struct resource *res = &dev->resource[resource_no];
if (res->start == 0 || res->end == 0 || res->end < res->start)
return 0;
- return res->end - res->start + 1;
+ return resource_size(res);
}
extern int macio_enable_devres(struct macio_dev *dev);