aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/imx.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-06-09 12:13:32 -0400
committerJiri Kosina <jkosina@suse.cz>2011-06-10 08:55:36 -0400
commit28f65c11f2ffb3957259dece647a24f8ad2e241b (patch)
tree6b7621d09d10df89eedd908d4506fb9f457a909f /drivers/tty/serial/imx.c
parent140a1ef2f91a00e1d25f0878c193abdc25bf6ebe (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/imx.c')
-rw-r--r--drivers/tty/serial/imx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index a54473123e0a..22fe801cce31 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -954,7 +954,7 @@ static void imx_release_port(struct uart_port *port)
954 struct resource *mmres; 954 struct resource *mmres;
955 955
956 mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0); 956 mmres = platform_get_resource(pdev, IORESOURCE_MEM, 0);
957 release_mem_region(mmres->start, mmres->end - mmres->start + 1); 957 release_mem_region(mmres->start, resource_size(mmres));
958} 958}
959 959
960/* 960/*
@@ -970,8 +970,7 @@ static int imx_request_port(struct uart_port *port)
970 if (!mmres) 970 if (!mmres)
971 return -ENODEV; 971 return -ENODEV;
972 972
973 ret = request_mem_region(mmres->start, mmres->end - mmres->start + 1, 973 ret = request_mem_region(mmres->start, resource_size(mmres), "imx-uart");
974 "imx-uart");
975 974
976 return ret ? 0 : -EBUSY; 975 return ret ? 0 : -EBUSY;
977} 976}