i2c: Use resource_size
authorJulia Lawall <julia@diku.dk>
Sun, 5 Jul 2009 06:37:50 +0000 (08:37 +0200)
committerBen Dooks <ben-linux@fluff.org>
Tue, 14 Jul 2009 23:03:56 +0000 (00:03 +0100)
Use the function resource_size, which reduces the chance of introducing
off-by-one errors in calculating the resource size.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
struct resource *res;
@@

- (res->end - res->start) + 1
+ resource_size(res)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>

No differences found