]> Pileus Git - ~andy/linux/blobdiff - drivers/thermal/armada_thermal.c
Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next
[~andy/linux] / drivers / thermal / armada_thermal.c
index 5b4d75fd7b49f3f857e39dacc04488977c3d448b..5e53212b984fd183f329a0fb7f7b48e778199f12 100644 (file)
@@ -169,21 +169,11 @@ static int armada_thermal_probe(struct platform_device *pdev)
                return -ENOMEM;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(&pdev->dev, "Failed to get platform resource\n");
-               return -ENODEV;
-       }
-
        priv->sensor = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(priv->sensor))
                return PTR_ERR(priv->sensor);
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-       if (!res) {
-               dev_err(&pdev->dev, "Failed to get platform resource\n");
-               return -ENODEV;
-       }
-
        priv->control = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(priv->control))
                return PTR_ERR(priv->control);
@@ -210,7 +200,6 @@ static int armada_thermal_exit(struct platform_device *pdev)
                platform_get_drvdata(pdev);
 
        thermal_zone_device_unregister(armada_thermal);
-       platform_set_drvdata(pdev, NULL);
 
        return 0;
 }
@@ -221,7 +210,7 @@ static struct platform_driver armada_thermal_driver = {
        .driver = {
                .name = "armada_thermal",
                .owner = THIS_MODULE,
-               .of_match_table = of_match_ptr(armada_thermal_id_table),
+               .of_match_table = armada_thermal_id_table,
        },
 };