]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
rtc-rtc-spear-use-devm_-routines-fix
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 15 Nov 2012 02:38:33 +0000 (13:38 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 15 Nov 2012 06:32:11 +0000 (17:32 +1100)
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/rtc/rtc-spear.c

index 480ecc3b73fdbceccc7439ee709a5cde3234267a..311a5274b5289bb03f32504f28b03de30ef0f7c6 100644 (file)
@@ -363,11 +363,6 @@ static int __devinit spear_rtc_probe(struct platform_device *pdev)
                dev_err(&pdev->dev, "no resource defined\n");
                return -EBUSY;
        }
-       if (!devm_request_mem_region(&pdev->dev, res->start, resource_size(res),
-                               pdev->name)) {
-               dev_err(&pdev->dev, "rtc region already claimed\n");
-               return -EBUSY;
-       }
 
        config = devm_kzalloc(&pdev->dev, sizeof(*config), GFP_KERNEL);
        if (!config) {
@@ -390,10 +385,9 @@ static int __devinit spear_rtc_probe(struct platform_device *pdev)
                return status;
        }
 
-       config->ioaddr = devm_ioremap(&pdev->dev, res->start,
-                       resource_size(res));
+       config->ioaddr = devm_request_and_ioremap(&pdev->dev, res);
        if (!config->ioaddr) {
-               dev_err(&pdev->dev, "ioremap fail\n");
+               dev_err(&pdev->dev, "request-ioremap fail\n");
                return -ENOMEM;
        }