]> git.baikalelectronics.ru Git - kernel.git/commit
i2c: Use resource_size macro
authorLinus Walleij <linus.walleij@stericsson.com>
Sat, 13 Jun 2009 22:20:36 +0000 (00:20 +0200)
committerBen Dooks <ben-linux@fluff.org>
Tue, 16 Jun 2009 21:42:16 +0000 (22:42 +0100)
commitea27e39b395f2f29b7136b416f8126b79ecbb1c8
tree9849cac5ca77534e38b4cb3c35a09d980ae84ff3
parent4340487d2f8e7ac61fdc4315c483abb8b42e61f4
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>
drivers/i2c/busses/i2c-at91.c
drivers/i2c/busses/i2c-au1550.c
drivers/i2c/busses/i2c-bfin-twi.c
drivers/i2c/busses/i2c-highlander.c
drivers/i2c/busses/i2c-mv64xxx.c
drivers/i2c/busses/i2c-ocores.c
drivers/i2c/busses/i2c-omap.c
drivers/i2c/busses/i2c-pca-platform.c
drivers/i2c/busses/i2c-pmcmsp.c
drivers/i2c/busses/i2c-pxa.c
drivers/i2c/busses/i2c-versatile.c