diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:24 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 14:41:58 -0500 |
commit | 4d6dc3a73543336be8d81ba748772c09730cf557 (patch) | |
tree | 00717ce62e6618ecd2bb283f5b1b40ee7afd278d /drivers/w1/masters | |
parent | bc3bad166ca6b9683e7990a028073860954e67fc (diff) |
w1: Convert to devm_ioremap_resource()
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>
Diffstat (limited to 'drivers/w1/masters')
-rw-r--r-- | drivers/w1/masters/omap_hdq.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/w1/masters/omap_hdq.c b/drivers/w1/masters/omap_hdq.c index 184dbce4abd1..db2390aed387 100644 --- a/drivers/w1/masters/omap_hdq.c +++ b/drivers/w1/masters/omap_hdq.c | |||
@@ -560,11 +560,9 @@ static int omap_hdq_probe(struct platform_device *pdev) | |||
560 | return -ENXIO; | 560 | return -ENXIO; |
561 | } | 561 | } |
562 | 562 | ||
563 | hdq_data->hdq_base = devm_request_and_ioremap(dev, res); | 563 | hdq_data->hdq_base = devm_ioremap_resource(dev, res); |
564 | if (!hdq_data->hdq_base) { | 564 | if (IS_ERR(hdq_data->hdq_base)) |
565 | dev_dbg(&pdev->dev, "ioremap failed\n"); | 565 | return PTR_ERR(hdq_data->hdq_base); |
566 | return -ENOMEM; | ||
567 | } | ||
568 | 566 | ||
569 | hdq_data->hdq_usecount = 0; | 567 | hdq_data->hdq_usecount = 0; |
570 | mutex_init(&hdq_data->hdq_mutex); | 568 | mutex_init(&hdq_data->hdq_mutex); |