summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-orion.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-11 05:11:25 +0400
committerGrant Likely <grant.likely@secretlab.ca>2011-06-11 09:43:41 +0400
commit8e2943c04c74e537c762c09bcea89e923510a9ac (patch)
tree6ea287e3597434d14c976d63c1dbf7c7d330e41a /drivers/spi/spi-orion.c
parente4c8308c852e6b3fa49215052a5b9e99597dee99 (diff)
downloadlinux-8e2943c04c74e537c762c09bcea89e923510a9ac.tar.xz
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-orion.c')
-rw-r--r--drivers/spi/spi-orion.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
index d48262829fdc..9421a390a5e3 100644
--- a/drivers/spi/spi-orion.c
+++ b/drivers/spi/spi-orion.c
@@ -489,7 +489,7 @@ static int __init orion_spi_probe(struct platform_device *pdev)
goto out;
}
- if (!request_mem_region(r->start, (r->end - r->start) + 1,
+ if (!request_mem_region(r->start, resource_size(r),
dev_name(&pdev->dev))) {
status = -EBUSY;
goto out;
@@ -511,7 +511,7 @@ static int __init orion_spi_probe(struct platform_device *pdev)
return status;
out_rel_mem:
- release_mem_region(r->start, (r->end - r->start) + 1);
+ release_mem_region(r->start, resource_size(r));
out:
spi_master_put(master);
@@ -531,7 +531,7 @@ static int __exit orion_spi_remove(struct platform_device *pdev)
cancel_work_sync(&spi->work);
r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- release_mem_region(r->start, (r->end - r->start) + 1);
+ release_mem_region(r->start, resource_size(r));
spi_unregister_master(master);