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/tty/serial/bfin_5xx.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/tty/serial/bfin_5xx.c')
-rw-r--r-- | drivers/tty/serial/bfin_5xx.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/serial/bfin_5xx.c b/drivers/tty/serial/bfin_5xx.c index 9b1ff2b6bb37..ff6979181ac5 100644 --- a/drivers/tty/serial/bfin_5xx.c +++ b/drivers/tty/serial/bfin_5xx.c | |||
@@ -1304,8 +1304,7 @@ static int bfin_serial_probe(struct platform_device *pdev) | |||
1304 | goto out_error_free_peripherals; | 1304 | goto out_error_free_peripherals; |
1305 | } | 1305 | } |
1306 | 1306 | ||
1307 | uart->port.membase = ioremap(res->start, | 1307 | uart->port.membase = ioremap(res->start, resource_size(res)); |
1308 | res->end - res->start); | ||
1309 | if (!uart->port.membase) { | 1308 | if (!uart->port.membase) { |
1310 | dev_err(&pdev->dev, "Cannot map uart IO\n"); | 1309 | dev_err(&pdev->dev, "Cannot map uart IO\n"); |
1311 | ret = -ENXIO; | 1310 | ret = -ENXIO; |
@@ -1483,7 +1482,7 @@ static int bfin_earlyprintk_probe(struct platform_device *pdev) | |||
1483 | } | 1482 | } |
1484 | 1483 | ||
1485 | bfin_earlyprintk_port.port.membase = ioremap(res->start, | 1484 | bfin_earlyprintk_port.port.membase = ioremap(res->start, |
1486 | res->end - res->start); | 1485 | resource_size(res)); |
1487 | if (!bfin_earlyprintk_port.port.membase) { | 1486 | if (!bfin_earlyprintk_port.port.membase) { |
1488 | dev_err(&pdev->dev, "Cannot map uart IO\n"); | 1487 | dev_err(&pdev->dev, "Cannot map uart IO\n"); |
1489 | ret = -ENXIO; | 1488 | ret = -ENXIO; |