]> 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 3eaca06df61703e9d556752ec0aa59066c093a3f..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);
@@ -487,8 +483,6 @@ static int rcar_thermal_remove(struct platform_device *pdev)
                        rcar_thermal_irq_disable(priv);
        }
 
-       platform_set_drvdata(pdev, NULL);
-
        pm_runtime_put_sync(dev);
        pm_runtime_disable(dev);