diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-at32ap700x.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-cmos.c | 6 | ||||
-rw-r--r-- | drivers/rtc/rtc-ds1286.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-ds1511.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-ds1742.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-m48t35.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-m48t59.c | 2 | ||||
-rw-r--r-- | drivers/rtc/rtc-mrst.c | 5 | ||||
-rw-r--r-- | drivers/rtc/rtc-puv3.c | 5 | ||||
-rw-r--r-- | drivers/rtc/rtc-s3c.c | 5 |
10 files changed, 15 insertions, 18 deletions
diff --git a/drivers/rtc/rtc-at32ap700x.c b/drivers/rtc/rtc-at32ap700x.c index e725d51e773d..8dd08305aae1 100644 --- a/drivers/rtc/rtc-at32ap700x.c +++ b/drivers/rtc/rtc-at32ap700x.c | |||
@@ -223,7 +223,7 @@ static int __init at32_rtc_probe(struct platform_device *pdev) | |||
223 | } | 223 | } |
224 | 224 | ||
225 | rtc->irq = irq; | 225 | rtc->irq = irq; |
226 | rtc->regs = ioremap(regs->start, regs->end - regs->start + 1); | 226 | rtc->regs = ioremap(regs->start, resource_size(regs)); |
227 | if (!rtc->regs) { | 227 | if (!rtc->regs) { |
228 | ret = -ENOMEM; | 228 | ret = -ENOMEM; |
229 | dev_dbg(&pdev->dev, "could not map I/O memory\n"); | 229 | dev_dbg(&pdev->dev, "could not map I/O memory\n"); |
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 911e75cdc125..05beb6c1ca79 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
@@ -606,7 +606,7 @@ cmos_do_probe(struct device *dev, struct resource *ports, int rtc_irq) | |||
606 | * (needing ioremap etc), not i/o space resources like this ... | 606 | * (needing ioremap etc), not i/o space resources like this ... |
607 | */ | 607 | */ |
608 | ports = request_region(ports->start, | 608 | ports = request_region(ports->start, |
609 | ports->end + 1 - ports->start, | 609 | resource_size(ports), |
610 | driver_name); | 610 | driver_name); |
611 | if (!ports) { | 611 | if (!ports) { |
612 | dev_dbg(dev, "i/o registers already in use\n"); | 612 | dev_dbg(dev, "i/o registers already in use\n"); |
@@ -750,7 +750,7 @@ cleanup1: | |||
750 | cmos_rtc.dev = NULL; | 750 | cmos_rtc.dev = NULL; |
751 | rtc_device_unregister(cmos_rtc.rtc); | 751 | rtc_device_unregister(cmos_rtc.rtc); |
752 | cleanup0: | 752 | cleanup0: |
753 | release_region(ports->start, ports->end + 1 - ports->start); | 753 | release_region(ports->start, resource_size(ports)); |
754 | return retval; | 754 | return retval; |
755 | } | 755 | } |
756 | 756 | ||
@@ -779,7 +779,7 @@ static void __exit cmos_do_remove(struct device *dev) | |||
779 | cmos->rtc = NULL; | 779 | cmos->rtc = NULL; |
780 | 780 | ||
781 | ports = cmos->iomem; | 781 | ports = cmos->iomem; |
782 | release_region(ports->start, ports->end + 1 - ports->start); | 782 | release_region(ports->start, resource_size(ports)); |
783 | cmos->iomem = NULL; | 783 | cmos->iomem = NULL; |
784 | 784 | ||
785 | cmos->dev = NULL; | 785 | cmos->dev = NULL; |
diff --git a/drivers/rtc/rtc-ds1286.c b/drivers/rtc/rtc-ds1286.c index 47e681df31e2..68e6caf25496 100644 --- a/drivers/rtc/rtc-ds1286.c +++ b/drivers/rtc/rtc-ds1286.c | |||
@@ -343,7 +343,7 @@ static int __devinit ds1286_probe(struct platform_device *pdev) | |||
343 | if (!priv) | 343 | if (!priv) |
344 | return -ENOMEM; | 344 | return -ENOMEM; |
345 | 345 | ||
346 | priv->size = res->end - res->start + 1; | 346 | priv->size = resource_size(res); |
347 | if (!request_mem_region(res->start, priv->size, pdev->name)) { | 347 | if (!request_mem_region(res->start, priv->size, pdev->name)) { |
348 | ret = -EBUSY; | 348 | ret = -EBUSY; |
349 | goto out; | 349 | goto out; |
diff --git a/drivers/rtc/rtc-ds1511.c b/drivers/rtc/rtc-ds1511.c index fbabc773dded..568ad30617e7 100644 --- a/drivers/rtc/rtc-ds1511.c +++ b/drivers/rtc/rtc-ds1511.c | |||
@@ -490,7 +490,7 @@ ds1511_rtc_probe(struct platform_device *pdev) | |||
490 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | 490 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |
491 | if (!pdata) | 491 | if (!pdata) |
492 | return -ENOMEM; | 492 | return -ENOMEM; |
493 | pdata->size = res->end - res->start + 1; | 493 | pdata->size = resource_size(res); |
494 | if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, | 494 | if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, |
495 | pdev->name)) | 495 | pdev->name)) |
496 | return -EBUSY; | 496 | return -EBUSY; |
diff --git a/drivers/rtc/rtc-ds1742.c b/drivers/rtc/rtc-ds1742.c index 042630c90dd3..d84a448dd754 100644 --- a/drivers/rtc/rtc-ds1742.c +++ b/drivers/rtc/rtc-ds1742.c | |||
@@ -173,7 +173,7 @@ static int __devinit ds1742_rtc_probe(struct platform_device *pdev) | |||
173 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); | 173 | pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); |
174 | if (!pdata) | 174 | if (!pdata) |
175 | return -ENOMEM; | 175 | return -ENOMEM; |
176 | pdata->size = res->end - res->start + 1; | 176 | pdata->size = resource_size(res); |
177 | if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, | 177 | if (!devm_request_mem_region(&pdev->dev, res->start, pdata->size, |
178 | pdev->name)) | 178 | pdev->name)) |
179 | return -EBUSY; | 179 | return -EBUSY; |
diff --git a/drivers/rtc/rtc-m48t35.c b/drivers/rtc/rtc-m48t35.c index 7410875e5838..8e2a24e33ed6 100644 --- a/drivers/rtc/rtc-m48t35.c +++ b/drivers/rtc/rtc-m48t35.c | |||
@@ -154,7 +154,7 @@ static int __devinit m48t35_probe(struct platform_device *pdev) | |||
154 | if (!priv) | 154 | if (!priv) |
155 | return -ENOMEM; | 155 | return -ENOMEM; |
156 | 156 | ||
157 | priv->size = res->end - res->start + 1; | 157 | priv->size = resource_size(res); |
158 | /* | 158 | /* |
159 | * kludge: remove the #ifndef after ioc3 resource | 159 | * kludge: remove the #ifndef after ioc3 resource |
160 | * conflicts are resolved | 160 | * conflicts are resolved |
diff --git a/drivers/rtc/rtc-m48t59.c b/drivers/rtc/rtc-m48t59.c index 3978f4caf724..28365388fb6c 100644 --- a/drivers/rtc/rtc-m48t59.c +++ b/drivers/rtc/rtc-m48t59.c | |||
@@ -433,7 +433,7 @@ static int __devinit m48t59_rtc_probe(struct platform_device *pdev) | |||
433 | 433 | ||
434 | if (!m48t59->ioaddr) { | 434 | if (!m48t59->ioaddr) { |
435 | /* ioaddr not mapped externally */ | 435 | /* ioaddr not mapped externally */ |
436 | m48t59->ioaddr = ioremap(res->start, res->end - res->start + 1); | 436 | m48t59->ioaddr = ioremap(res->start, resource_size(res)); |
437 | if (!m48t59->ioaddr) | 437 | if (!m48t59->ioaddr) |
438 | goto out; | 438 | goto out; |
439 | } | 439 | } |
diff --git a/drivers/rtc/rtc-mrst.c b/drivers/rtc/rtc-mrst.c index 0cec5650d56a..d33544802a2e 100644 --- a/drivers/rtc/rtc-mrst.c +++ b/drivers/rtc/rtc-mrst.c | |||
@@ -332,9 +332,8 @@ vrtc_mrst_do_probe(struct device *dev, struct resource *iomem, int rtc_irq) | |||
332 | if (!iomem) | 332 | if (!iomem) |
333 | return -ENODEV; | 333 | return -ENODEV; |
334 | 334 | ||
335 | iomem = request_mem_region(iomem->start, | 335 | iomem = request_mem_region(iomem->start, resource_size(iomem), |
336 | iomem->end + 1 - iomem->start, | 336 | driver_name); |
337 | driver_name); | ||
338 | if (!iomem) { | 337 | if (!iomem) { |
339 | dev_dbg(dev, "i/o mem already in use.\n"); | 338 | dev_dbg(dev, "i/o mem already in use.\n"); |
340 | return -EBUSY; | 339 | return -EBUSY; |
diff --git a/drivers/rtc/rtc-puv3.c b/drivers/rtc/rtc-puv3.c index 46f14b82f3ab..b3eba3cddd42 100644 --- a/drivers/rtc/rtc-puv3.c +++ b/drivers/rtc/rtc-puv3.c | |||
@@ -267,9 +267,8 @@ static int puv3_rtc_probe(struct platform_device *pdev) | |||
267 | return -ENOENT; | 267 | return -ENOENT; |
268 | } | 268 | } |
269 | 269 | ||
270 | puv3_rtc_mem = request_mem_region(res->start, | 270 | puv3_rtc_mem = request_mem_region(res->start, resource_size(res), |
271 | res->end-res->start+1, | 271 | pdev->name); |
272 | pdev->name); | ||
273 | 272 | ||
274 | if (puv3_rtc_mem == NULL) { | 273 | if (puv3_rtc_mem == NULL) { |
275 | dev_err(&pdev->dev, "failed to reserve memory region\n"); | 274 | dev_err(&pdev->dev, "failed to reserve memory region\n"); |
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c index 53c99b1a3c92..9329dbb9ebab 100644 --- a/drivers/rtc/rtc-s3c.c +++ b/drivers/rtc/rtc-s3c.c | |||
@@ -474,8 +474,7 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev) | |||
474 | return -ENOENT; | 474 | return -ENOENT; |
475 | } | 475 | } |
476 | 476 | ||
477 | s3c_rtc_mem = request_mem_region(res->start, | 477 | s3c_rtc_mem = request_mem_region(res->start, resource_size(res), |
478 | res->end-res->start+1, | ||
479 | pdev->name); | 478 | pdev->name); |
480 | 479 | ||
481 | if (s3c_rtc_mem == NULL) { | 480 | if (s3c_rtc_mem == NULL) { |
@@ -484,7 +483,7 @@ static int __devinit s3c_rtc_probe(struct platform_device *pdev) | |||
484 | goto err_nores; | 483 | goto err_nores; |
485 | } | 484 | } |
486 | 485 | ||
487 | s3c_rtc_base = ioremap(res->start, res->end - res->start + 1); | 486 | s3c_rtc_base = ioremap(res->start, resource_size(res)); |
488 | if (s3c_rtc_base == NULL) { | 487 | if (s3c_rtc_base == NULL) { |
489 | dev_err(&pdev->dev, "failed ioremap()\n"); | 488 | dev_err(&pdev->dev, "failed ioremap()\n"); |
490 | ret = -EINVAL; | 489 | ret = -EINVAL; |