aboutsummaryrefslogtreecommitdiff
path: root/drivers/spi/spi-ppc4xx.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-10 18:11:25 -0700
committerGrant Likely <grant.likely@secretlab.ca>2011-06-10 23:43:41 -0600
commit8e2943c04c74e537c762c09bcea89e923510a9ac (patch)
tree6ea287e3597434d14c976d63c1dbf7c7d330e41a /drivers/spi/spi-ppc4xx.c
parente4c8308c852e6b3fa49215052a5b9e99597dee99 (diff)
spi: Convert uses of struct resource * to resource_size(ptr)
Done via coccinelle scripts like: @@ struct resource *ptr; @@ - ptr->end - ptr->start + 1 + resource_size(ptr) and some grep and typing. Mostly uncompiled, no cross-compilers. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/spi/spi-ppc4xx.c')
-rw-r--r--drivers/spi/spi-ppc4xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c
index 2a298c02919..b267fd901e5 100644
--- a/drivers/spi/spi-ppc4xx.c
+++ b/drivers/spi/spi-ppc4xx.c
@@ -502,7 +502,7 @@ static int __init spi_ppc4xx_of_probe(struct platform_device *op)
goto free_gpios;
}
hw->mapbase = resource.start;
- hw->mapsize = resource.end - resource.start + 1;
+ hw->mapsize = resource_size(&resource);
/* Sanity check */
if (hw->mapsize < sizeof(struct spi_ppc4xx_regs)) {