diff options
author | Joe Perches <joe@perches.com> | 2011-06-09 12:13:32 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2011-06-10 08:55:36 -0400 |
commit | 28f65c11f2ffb3957259dece647a24f8ad2e241b (patch) | |
tree | 6b7621d09d10df89eedd908d4506fb9f457a909f /drivers/video/atmel_lcdfb.c | |
parent | 140a1ef2f91a00e1d25f0878c193abdc25bf6ebe (diff) |
treewide: Convert uses of struct resource to resource_size(ptr)
Several fixes as well where the +1 was missing.
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: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/video/atmel_lcdfb.c')
-rw-r--r-- | drivers/video/atmel_lcdfb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/atmel_lcdfb.c b/drivers/video/atmel_lcdfb.c index 4484c721f0f9..817ab60f7537 100644 --- a/drivers/video/atmel_lcdfb.c +++ b/drivers/video/atmel_lcdfb.c | |||
@@ -906,7 +906,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) | |||
906 | if (map) { | 906 | if (map) { |
907 | /* use a pre-allocated memory buffer */ | 907 | /* use a pre-allocated memory buffer */ |
908 | info->fix.smem_start = map->start; | 908 | info->fix.smem_start = map->start; |
909 | info->fix.smem_len = map->end - map->start + 1; | 909 | info->fix.smem_len = resource_size(map); |
910 | if (!request_mem_region(info->fix.smem_start, | 910 | if (!request_mem_region(info->fix.smem_start, |
911 | info->fix.smem_len, pdev->name)) { | 911 | info->fix.smem_len, pdev->name)) { |
912 | ret = -EBUSY; | 912 | ret = -EBUSY; |
@@ -932,7 +932,7 @@ static int __init atmel_lcdfb_probe(struct platform_device *pdev) | |||
932 | 932 | ||
933 | /* LCDC registers */ | 933 | /* LCDC registers */ |
934 | info->fix.mmio_start = regs->start; | 934 | info->fix.mmio_start = regs->start; |
935 | info->fix.mmio_len = regs->end - regs->start + 1; | 935 | info->fix.mmio_len = resource_size(regs); |
936 | 936 | ||
937 | if (!request_mem_region(info->fix.mmio_start, | 937 | if (!request_mem_region(info->fix.mmio_start, |
938 | info->fix.mmio_len, pdev->name)) { | 938 | info->fix.mmio_len, pdev->name)) { |