]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/thermal/kirkwood_thermal.c
Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next
[karo-tx-linux.git] / drivers / thermal / kirkwood_thermal.c
index dfeceaffbc03c3f462170d721124ad3b3eac1db9..3b034a0dfc9426ad48018699772fc024163156b6 100644 (file)
@@ -75,16 +75,11 @@ static int kirkwood_thermal_probe(struct platform_device *pdev)
        struct kirkwood_thermal_priv *priv;
        struct resource *res;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(&pdev->dev, "Failed to get platform resource\n");
-               return -ENODEV;
-       }
-
        priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
        if (!priv)
                return -ENOMEM;
 
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        priv->sensor = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(priv->sensor))
                return PTR_ERR(priv->sensor);
@@ -108,7 +103,6 @@ static int kirkwood_thermal_exit(struct platform_device *pdev)
                platform_get_drvdata(pdev);
 
        thermal_zone_device_unregister(kirkwood_thermal);
-       platform_set_drvdata(pdev, NULL);
 
        return 0;
 }
@@ -121,7 +115,7 @@ static struct platform_driver kirkwood_thermal_driver = {
        .driver = {
                .name = "kirkwood_thermal",
                .owner = THIS_MODULE,
-               .of_match_table = of_match_ptr(kirkwood_thermal_id_table),
+               .of_match_table = kirkwood_thermal_id_table,
        },
 };