]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/thermal/dove_thermal.c
Merge branches 'misc', 'drv_cleanup', 'devm-cleanup' and 'ti-soc' of .git into next
[karo-tx-linux.git] / drivers / thermal / dove_thermal.c
index 900479e69ccb48dda9af8dd62f2d982cae528f33..828f5e345c303ef9b15662477dfd01d16c8a96f6 100644 (file)
@@ -134,25 +134,16 @@ static int dove_thermal_probe(struct platform_device *pdev)
        struct resource *res;
        int ret;
 
-       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);
 
        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);
@@ -194,7 +185,7 @@ static struct platform_driver dove_thermal_driver = {
        .driver = {
                .name = "dove_thermal",
                .owner = THIS_MODULE,
-               .of_match_table = of_match_ptr(dove_thermal_id_table),
+               .of_match_table = dove_thermal_id_table,
        },
 };