aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWolfram Sang <wsa@the-dreams.de>2013-05-12 09:19:50 -0400
committerWolfram Sang <wsa@the-dreams.de>2013-05-18 05:57:07 -0400
commita177c3ac25df166dbdde03e09ba8cb3065742807 (patch)
tree5925bf1e40125578f12d5f9bb4f0f6e1a3d84481 /drivers
parent362e9cd2f54e3c72a37ff8e3319366554e48c555 (diff)
drivers/rtc: don't check resource with devm_ioremap_resource
devm_ioremap_resource does sanity checks on the given resource. No need to duplicate this in the driver. Signed-off-by: Wolfram Sang <wsa@the-dreams.de> Acked-by: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/rtc/rtc-nuc900.c5
-rw-r--r--drivers/rtc/rtc-omap.c5
-rw-r--r--drivers/rtc/rtc-s3c.c5
-rw-r--r--drivers/rtc/rtc-tegra.c6
4 files changed, 0 insertions, 21 deletions
diff --git a/drivers/rtc/rtc-nuc900.c b/drivers/rtc/rtc-nuc900.c
index f5dfb6e5e7d9..d592e2fe43f7 100644
--- a/drivers/rtc/rtc-nuc900.c
+++ b/drivers/rtc/rtc-nuc900.c
@@ -234,11 +234,6 @@ static int __init nuc900_rtc_probe(struct platform_device *pdev)
234 return -ENOMEM; 234 return -ENOMEM;
235 } 235 }
236 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 236 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
237 if (!res) {
238 dev_err(&pdev->dev, "platform_get_resource failed\n");
239 return -ENXIO;
240 }
241
242 nuc900_rtc->rtc_reg = devm_ioremap_resource(&pdev->dev, res); 237 nuc900_rtc->rtc_reg = devm_ioremap_resource(&pdev->dev, res);
243 if (IS_ERR(nuc900_rtc->rtc_reg)) 238 if (IS_ERR(nuc900_rtc->rtc_reg))
244 return PTR_ERR(nuc900_rtc->rtc_reg); 239 return PTR_ERR(nuc900_rtc->rtc_reg);
diff --git a/drivers/rtc/rtc-omap.c b/drivers/rtc/rtc-omap.c
index 4e1bdb832e37..b0ba3fc991ea 100644
--- a/drivers/rtc/rtc-omap.c
+++ b/drivers/rtc/rtc-omap.c
@@ -347,11 +347,6 @@ static int __init omap_rtc_probe(struct platform_device *pdev)
347 } 347 }
348 348
349 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 349 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
350 if (!res) {
351 pr_debug("%s: RTC resource data missing\n", pdev->name);
352 return -ENOENT;
353 }
354
355 rtc_base = devm_ioremap_resource(&pdev->dev, res); 350 rtc_base = devm_ioremap_resource(&pdev->dev, res);
356 if (IS_ERR(rtc_base)) 351 if (IS_ERR(rtc_base))
357 return PTR_ERR(rtc_base); 352 return PTR_ERR(rtc_base);
diff --git a/drivers/rtc/rtc-s3c.c b/drivers/rtc/rtc-s3c.c
index 14040b22888d..0b495e8b8e66 100644
--- a/drivers/rtc/rtc-s3c.c
+++ b/drivers/rtc/rtc-s3c.c
@@ -477,11 +477,6 @@ static int s3c_rtc_probe(struct platform_device *pdev)
477 /* get the memory region */ 477 /* get the memory region */
478 478
479 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 479 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
480 if (res == NULL) {
481 dev_err(&pdev->dev, "failed to get memory region resource\n");
482 return -ENOENT;
483 }
484
485 s3c_rtc_base = devm_ioremap_resource(&pdev->dev, res); 480 s3c_rtc_base = devm_ioremap_resource(&pdev->dev, res);
486 if (IS_ERR(s3c_rtc_base)) 481 if (IS_ERR(s3c_rtc_base))
487 return PTR_ERR(s3c_rtc_base); 482 return PTR_ERR(s3c_rtc_base);
diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
index a34315d25478..76af92ad5a8a 100644
--- a/drivers/rtc/rtc-tegra.c
+++ b/drivers/rtc/rtc-tegra.c
@@ -322,12 +322,6 @@ static int __init tegra_rtc_probe(struct platform_device *pdev)
322 return -ENOMEM; 322 return -ENOMEM;
323 323
324 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 324 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
325 if (!res) {
326 dev_err(&pdev->dev,
327 "Unable to allocate resources for device.\n");
328 return -EBUSY;
329 }
330
331 info->rtc_base = devm_ioremap_resource(&pdev->dev, res); 325 info->rtc_base = devm_ioremap_resource(&pdev->dev, res);
332 if (IS_ERR(info->rtc_base)) 326 if (IS_ERR(info->rtc_base))
333 return PTR_ERR(info->rtc_base); 327 return PTR_ERR(info->rtc_base);