aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-mv64xxx.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@stericsson.com>2009-06-14 00:20:36 +0200
committerBen Dooks <ben-linux@fluff.org>2009-06-16 22:42:16 +0100
commitc6ffddea36dd576b70dfbd10eb5d2b287b786dca (patch)
tree9849cac5ca77534e38b4cb3c35a09d980ae84ff3 /drivers/i2c/busses/i2c-mv64xxx.c
parent18904c0ecdf2cf22347da2adc4b273e9570333d8 (diff)
downloadkernel_samsung_smdk4412-c6ffddea36dd576b70dfbd10eb5d2b287b786dca.zip
kernel_samsung_smdk4412-c6ffddea36dd576b70dfbd10eb5d2b287b786dca.tar.gz
kernel_samsung_smdk4412-c6ffddea36dd576b70dfbd10eb5d2b287b786dca.tar.bz2
i2c: Use resource_size macro
This replace all instances in the i2c busses tree of res->end - res->start + 1 with the handy macro resource_size(res) from ioport.h (coming in from platform_device.h). This was created with a simple sed -i -e 's/\([a-z]*\)->end *- *[a-z]*->start *+ *1/resource_size(\1)/g' Then manually replacing the PXA redefiniton of the same kind of macro manually. Recompiled some ARM defconfigs I could find to make a rough test so it shouldn't break anything, though I couldn't see exactly which configs you need for all the drivers. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-mv64xxx.c')
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 5a4945d..c3869d9 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -469,7 +469,7 @@ mv64xxx_i2c_map_regs(struct platform_device *pd,
if (!r)
return -ENODEV;
- size = r->end - r->start + 1;
+ size = resource_size(r);
if (!request_mem_region(r->start, size, drv_data->adapter.name))
return -EBUSY;