]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/thermal/rcar_thermal.c
Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next
[karo-tx-linux.git] / drivers / thermal / rcar_thermal.c
index 63c7c13d79f3884b9b5d244c599b1bc1cdb1f9d5..88f92e1a99440c7bb3763ff691e3d01d09e2ad25 100644 (file)
@@ -389,11 +389,6 @@ static int rcar_thermal_probe(struct platform_device *pdev)
                 * platform has IRQ support.
                 * Then, drier use common register
                 */
-               res = platform_get_resource(pdev, IORESOURCE_MEM, mres++);
-               if (!res) {
-                       dev_err(dev, "Could not get platform resource\n");
-                       return -ENODEV;
-               }
 
                ret = devm_request_irq(dev, irq->start, rcar_thermal_irq, 0,
                                       dev_name(dev), common);
@@ -405,6 +400,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
                /*
                 * rcar_has_irq_support() will be enabled
                 */
+               res = platform_get_resource(pdev, IORESOURCE_MEM, mres++);
                common->base = devm_ioremap_resource(dev, res);
                if (IS_ERR(common->base))
                        return PTR_ERR(common->base);
@@ -458,7 +454,7 @@ static int rcar_thermal_probe(struct platform_device *pdev)
 
        platform_set_drvdata(pdev, common);
 
-       dev_info(dev, "%d sensor proved\n", i);
+       dev_info(dev, "%d sensor probed\n", i);
 
        return 0;