aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/watchdog/adx_wdt.c4
-rw-r--r--drivers/watchdog/at32ap700x_wdt.c2
-rw-r--r--drivers/watchdog/davinci_wdt.c2
-rw-r--r--drivers/watchdog/mpcore_wdt.c2
-rw-r--r--drivers/watchdog/mv64x60_wdt.c2
-rw-r--r--drivers/watchdog/omap_wdt.c9
-rw-r--r--drivers/watchdog/pnx4008_wdt.c2
-rw-r--r--drivers/watchdog/s3c2410_wdt.c2
-rw-r--r--drivers/watchdog/txx9wdt.c6
9 files changed, 14 insertions, 17 deletions
diff --git a/drivers/watchdog/adx_wdt.c b/drivers/watchdog/adx_wdt.c
index 9c6594473d3b..9d7d155364f8 100644
--- a/drivers/watchdog/adx_wdt.c
+++ b/drivers/watchdog/adx_wdt.c
@@ -242,14 +242,14 @@ static int __devinit adx_wdt_probe(struct platform_device *pdev)
242 } 242 }
243 243
244 res = devm_request_mem_region(&pdev->dev, res->start, 244 res = devm_request_mem_region(&pdev->dev, res->start,
245 res->end - res->start + 1, res->name); 245 resource_size(res), res->name);
246 if (!res) { 246 if (!res) {
247 dev_err(&pdev->dev, "cannot request I/O memory region\n"); 247 dev_err(&pdev->dev, "cannot request I/O memory region\n");
248 return -ENXIO; 248 return -ENXIO;
249 } 249 }
250 250
251 wdt->base = devm_ioremap_nocache(&pdev->dev, res->start, 251 wdt->base = devm_ioremap_nocache(&pdev->dev, res->start,
252 res->end - res->start + 1); 252 resource_size(res));
253 if (!wdt->base) { 253 if (!wdt->base) {
254 dev_err(&pdev->dev, "cannot remap I/O memory region\n"); 254 dev_err(&pdev->dev, "cannot remap I/O memory region\n");
255 return -ENXIO; 255 return -ENXIO;
diff --git a/drivers/watchdog/at32ap700x_wdt.c b/drivers/watchdog/at32ap700x_wdt.c
index e8ae638e5804..037847923dcb 100644
--- a/drivers/watchdog/at32ap700x_wdt.c
+++ b/drivers/watchdog/at32ap700x_wdt.c
@@ -326,7 +326,7 @@ static int __init at32_wdt_probe(struct platform_device *pdev)
326 return -ENOMEM; 326 return -ENOMEM;
327 } 327 }
328 328
329 wdt->regs = ioremap(regs->start, regs->end - regs->start + 1); 329 wdt->regs = ioremap(regs->start, resource_size(regs));
330 if (!wdt->regs) { 330 if (!wdt->regs) {
331 ret = -ENOMEM; 331 ret = -ENOMEM;
332 dev_dbg(&pdev->dev, "could not map I/O memory\n"); 332 dev_dbg(&pdev->dev, "could not map I/O memory\n");
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index 9d7520fa9e9c..887136de1857 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -221,7 +221,7 @@ static int __devinit davinci_wdt_probe(struct platform_device *pdev)
221 return -ENOENT; 221 return -ENOENT;
222 } 222 }
223 223
224 size = res->end - res->start + 1; 224 size = resource_size(res);
225 wdt_mem = request_mem_region(res->start, size, pdev->name); 225 wdt_mem = request_mem_region(res->start, size, pdev->name);
226 226
227 if (wdt_mem == NULL) { 227 if (wdt_mem == NULL) {
diff --git a/drivers/watchdog/mpcore_wdt.c b/drivers/watchdog/mpcore_wdt.c
index 83fa34b214b4..a2dc07c2ed49 100644
--- a/drivers/watchdog/mpcore_wdt.c
+++ b/drivers/watchdog/mpcore_wdt.c
@@ -350,7 +350,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev)
350 ret = -ENXIO; 350 ret = -ENXIO;
351 goto err_free; 351 goto err_free;
352 } 352 }
353 wdt->base = ioremap(res->start, res->end - res->start + 1); 353 wdt->base = ioremap(res->start, resource_size(res));
354 if (!wdt->base) { 354 if (!wdt->base) {
355 ret = -ENOMEM; 355 ret = -ENOMEM;
356 goto err_free; 356 goto err_free;
diff --git a/drivers/watchdog/mv64x60_wdt.c b/drivers/watchdog/mv64x60_wdt.c
index acf589dc057c..a51dbe4c43da 100644
--- a/drivers/watchdog/mv64x60_wdt.c
+++ b/drivers/watchdog/mv64x60_wdt.c
@@ -275,7 +275,7 @@ static int __devinit mv64x60_wdt_probe(struct platform_device *dev)
275 if (!r) 275 if (!r)
276 return -ENODEV; 276 return -ENODEV;
277 277
278 mv64x60_wdt_regs = ioremap(r->start, r->end - r->start + 1); 278 mv64x60_wdt_regs = ioremap(r->start, resource_size(r));
279 if (mv64x60_wdt_regs == NULL) 279 if (mv64x60_wdt_regs == NULL)
280 return -ENOMEM; 280 return -ENOMEM;
281 281
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index 429ea99eaee5..c6aaf2845741 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -277,8 +277,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
277 goto err_busy; 277 goto err_busy;
278 } 278 }
279 279
280 mem = request_mem_region(res->start, res->end - res->start + 1, 280 mem = request_mem_region(res->start, resource_size(res), pdev->name);
281 pdev->name);
282 if (!mem) { 281 if (!mem) {
283 ret = -EBUSY; 282 ret = -EBUSY;
284 goto err_busy; 283 goto err_busy;
@@ -306,7 +305,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
306 goto err_clk; 305 goto err_clk;
307 } 306 }
308 307
309 wdev->base = ioremap(res->start, res->end - res->start + 1); 308 wdev->base = ioremap(res->start, resource_size(res));
310 if (!wdev->base) { 309 if (!wdev->base) {
311 ret = -ENOMEM; 310 ret = -ENOMEM;
312 goto err_ioremap; 311 goto err_ioremap;
@@ -358,7 +357,7 @@ err_clk:
358 kfree(wdev); 357 kfree(wdev);
359 358
360err_kzalloc: 359err_kzalloc:
361 release_mem_region(res->start, res->end - res->start + 1); 360 release_mem_region(res->start, resource_size(res));
362 361
363err_busy: 362err_busy:
364err_get_resource: 363err_get_resource:
@@ -383,7 +382,7 @@ static int __devexit omap_wdt_remove(struct platform_device *pdev)
383 return -ENOENT; 382 return -ENOENT;
384 383
385 misc_deregister(&(wdev->omap_wdt_miscdev)); 384 misc_deregister(&(wdev->omap_wdt_miscdev));
386 release_mem_region(res->start, res->end - res->start + 1); 385 release_mem_region(res->start, resource_size(res));
387 platform_set_drvdata(pdev, NULL); 386 platform_set_drvdata(pdev, NULL);
388 387
389 clk_put(wdev->ick); 388 clk_put(wdev->ick);
diff --git a/drivers/watchdog/pnx4008_wdt.c b/drivers/watchdog/pnx4008_wdt.c
index 4d227b152001..430a5848a9a5 100644
--- a/drivers/watchdog/pnx4008_wdt.c
+++ b/drivers/watchdog/pnx4008_wdt.c
@@ -264,7 +264,7 @@ static int __devinit pnx4008_wdt_probe(struct platform_device *pdev)
264 return -ENOENT; 264 return -ENOENT;
265 } 265 }
266 266
267 size = res->end - res->start + 1; 267 size = resource_size(res);
268 wdt_mem = request_mem_region(res->start, size, pdev->name); 268 wdt_mem = request_mem_region(res->start, size, pdev->name);
269 269
270 if (wdt_mem == NULL) { 270 if (wdt_mem == NULL) {
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c
index 85b93e15d011..8760a26ab2a3 100644
--- a/drivers/watchdog/s3c2410_wdt.c
+++ b/drivers/watchdog/s3c2410_wdt.c
@@ -421,7 +421,7 @@ static int __devinit s3c2410wdt_probe(struct platform_device *pdev)
421 return -ENOENT; 421 return -ENOENT;
422 } 422 }
423 423
424 size = (res->end - res->start) + 1; 424 size = resource_size(res);
425 wdt_mem = request_mem_region(res->start, size, pdev->name); 425 wdt_mem = request_mem_region(res->start, size, pdev->name);
426 if (wdt_mem == NULL) { 426 if (wdt_mem == NULL) {
427 dev_err(dev, "failed to get memory region\n"); 427 dev_err(dev, "failed to get memory region\n");
diff --git a/drivers/watchdog/txx9wdt.c b/drivers/watchdog/txx9wdt.c
index 6adab77fbbb0..d635566e9307 100644
--- a/drivers/watchdog/txx9wdt.c
+++ b/drivers/watchdog/txx9wdt.c
@@ -214,12 +214,10 @@ static int __init txx9wdt_probe(struct platform_device *dev)
214 res = platform_get_resource(dev, IORESOURCE_MEM, 0); 214 res = platform_get_resource(dev, IORESOURCE_MEM, 0);
215 if (!res) 215 if (!res)
216 goto exit_busy; 216 goto exit_busy;
217 if (!devm_request_mem_region(&dev->dev, 217 if (!devm_request_mem_region(&dev->dev, res->start, resource_size(res),
218 res->start, res->end - res->start + 1,
219 "txx9wdt")) 218 "txx9wdt"))
220 goto exit_busy; 219 goto exit_busy;
221 txx9wdt_reg = devm_ioremap(&dev->dev, 220 txx9wdt_reg = devm_ioremap(&dev->dev, res->start, resource_size(res));
222 res->start, res->end - res->start + 1);
223 if (!txx9wdt_reg) 221 if (!txx9wdt_reg)
224 goto exit_busy; 222 goto exit_busy;
225 223