diff options
Diffstat (limited to 'drivers/input/touchscreen/atmel_tsadcc.c')
-rw-r--r-- | drivers/input/touchscreen/atmel_tsadcc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/input/touchscreen/atmel_tsadcc.c b/drivers/input/touchscreen/atmel_tsadcc.c index 055969e8be13..9c7fce4d74d0 100644 --- a/drivers/input/touchscreen/atmel_tsadcc.c +++ b/drivers/input/touchscreen/atmel_tsadcc.c | |||
@@ -204,14 +204,14 @@ static int __devinit atmel_tsadcc_probe(struct platform_device *pdev) | |||
204 | goto err_free_dev; | 204 | goto err_free_dev; |
205 | } | 205 | } |
206 | 206 | ||
207 | if (!request_mem_region(res->start, res->end - res->start + 1, | 207 | if (!request_mem_region(res->start, resource_size(res), |
208 | "atmel tsadcc regs")) { | 208 | "atmel tsadcc regs")) { |
209 | dev_err(&pdev->dev, "resources is unavailable.\n"); | 209 | dev_err(&pdev->dev, "resources is unavailable.\n"); |
210 | err = -EBUSY; | 210 | err = -EBUSY; |
211 | goto err_free_dev; | 211 | goto err_free_dev; |
212 | } | 212 | } |
213 | 213 | ||
214 | tsc_base = ioremap(res->start, res->end - res->start + 1); | 214 | tsc_base = ioremap(res->start, resource_size(res)); |
215 | if (!tsc_base) { | 215 | if (!tsc_base) { |
216 | dev_err(&pdev->dev, "failed to map registers.\n"); | 216 | dev_err(&pdev->dev, "failed to map registers.\n"); |
217 | err = -ENOMEM; | 217 | err = -ENOMEM; |
@@ -286,7 +286,7 @@ err_free_irq: | |||
286 | err_unmap_regs: | 286 | err_unmap_regs: |
287 | iounmap(tsc_base); | 287 | iounmap(tsc_base); |
288 | err_release_mem: | 288 | err_release_mem: |
289 | release_mem_region(res->start, res->end - res->start + 1); | 289 | release_mem_region(res->start, resource_size(res)); |
290 | err_free_dev: | 290 | err_free_dev: |
291 | input_free_device(ts_dev->input); | 291 | input_free_device(ts_dev->input); |
292 | err_free_mem: | 292 | err_free_mem: |
@@ -305,7 +305,7 @@ static int __devexit atmel_tsadcc_remove(struct platform_device *pdev) | |||
305 | 305 | ||
306 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 306 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
307 | iounmap(tsc_base); | 307 | iounmap(tsc_base); |
308 | release_mem_region(res->start, res->end - res->start + 1); | 308 | release_mem_region(res->start, resource_size(res)); |
309 | 309 | ||
310 | clk_disable(ts_dev->clk); | 310 | clk_disable(ts_dev->clk); |
311 | clk_put(ts_dev->clk); | 311 | clk_put(ts_dev->clk); |