aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-pxa
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2010-03-22 04:16:24 -0400
committerEric Miao <eric.y.miao@gmail.com>2010-05-11 11:24:59 -0400
commitc8ee5c69516fdd973b981e3ac12d49b3133930cd (patch)
treefe99967f52505cc20426561c14ced70ebcabfeff /arch/arm/plat-pxa
parent077de1ad5ad8b4e08fd8853ae7e4cc628c1a369b (diff)
[ARM] pxa: use resource_size() in ssp.c
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/plat-pxa')
-rw-r--r--arch/arm/plat-pxa/ssp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/plat-pxa/ssp.c b/arch/arm/plat-pxa/ssp.c
index 3bf704d7a0d6..52c07cc756d7 100644
--- a/arch/arm/plat-pxa/ssp.c
+++ b/arch/arm/plat-pxa/ssp.c
@@ -115,7 +115,7 @@ static int __devinit ssp_probe(struct platform_device *pdev)
115 goto err_free_clk; 115 goto err_free_clk;
116 } 116 }
117 117
118 res = request_mem_region(res->start, res->end - res->start + 1, 118 res = request_mem_region(res->start, resource_size(res),
119 pdev->name); 119 pdev->name);
120 if (res == NULL) { 120 if (res == NULL) {
121 dev_err(&pdev->dev, "failed to request memory resource\n"); 121 dev_err(&pdev->dev, "failed to request memory resource\n");
@@ -125,7 +125,7 @@ static int __devinit ssp_probe(struct platform_device *pdev)
125 125
126 ssp->phys_base = res->start; 126 ssp->phys_base = res->start;
127 127
128 ssp->mmio_base = ioremap(res->start, res->end - res->start + 1); 128 ssp->mmio_base = ioremap(res->start, resource_size(res));
129 if (ssp->mmio_base == NULL) { 129 if (ssp->mmio_base == NULL) {
130 dev_err(&pdev->dev, "failed to ioremap() registers\n"); 130 dev_err(&pdev->dev, "failed to ioremap() registers\n");
131 ret = -ENODEV; 131 ret = -ENODEV;
@@ -156,7 +156,7 @@ static int __devinit ssp_probe(struct platform_device *pdev)
156err_free_io: 156err_free_io:
157 iounmap(ssp->mmio_base); 157 iounmap(ssp->mmio_base);
158err_free_mem: 158err_free_mem:
159 release_mem_region(res->start, res->end - res->start + 1); 159 release_mem_region(res->start, resource_size(res));
160err_free_clk: 160err_free_clk:
161 clk_put(ssp->clk); 161 clk_put(ssp->clk);
162err_free: 162err_free:
@@ -176,7 +176,7 @@ static int __devexit ssp_remove(struct platform_device *pdev)
176 iounmap(ssp->mmio_base); 176 iounmap(ssp->mmio_base);
177 177
178 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 178 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
179 release_mem_region(res->start, res->end - res->start + 1); 179 release_mem_region(res->start, resource_size(res));
180 180
181 clk_put(ssp->clk); 181 clk_put(ssp->clk);
182 182