]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
w1: Convert to devm_ioremap_resource()
authorThierry Reding <thierry.reding@avionic-design.de>
Mon, 21 Jan 2013 10:09:24 +0000 (11:09 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 22 Jan 2013 19:41:58 +0000 (11:41 -0800)
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Acked-by: Evgeniy Polyakov <zbr@ioremap.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/w1/masters/omap_hdq.c

index 184dbce4abd1bbaa2595bbae48037d28bf6b301a..db2390aed38781705deeb179790d8a540d9660eb 100644 (file)
@@ -560,11 +560,9 @@ static int omap_hdq_probe(struct platform_device *pdev)
                return -ENXIO;
        }
 
-       hdq_data->hdq_base = devm_request_and_ioremap(dev, res);
-       if (!hdq_data->hdq_base) {
-               dev_dbg(&pdev->dev, "ioremap failed\n");
-               return -ENOMEM;
-       }
+       hdq_data->hdq_base = devm_ioremap_resource(dev, res);
+       if (IS_ERR(hdq_data->hdq_base))
+               return PTR_ERR(hdq_data->hdq_base);
 
        hdq_data->hdq_usecount = 0;
        mutex_init(&hdq_data->hdq_mutex);