Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thierry Reding and committed by
Greg Kroah-Hartman
4d6dc3a7 bc3bad16

+3 -5
+3 -5
drivers/w1/masters/omap_hdq.c
··· 560 560 return -ENXIO; 561 561 } 562 562 563 - hdq_data->hdq_base = devm_request_and_ioremap(dev, res); 564 - if (!hdq_data->hdq_base) { 565 - dev_dbg(&pdev->dev, "ioremap failed\n"); 566 - return -ENOMEM; 567 - } 563 + hdq_data->hdq_base = devm_ioremap_resource(dev, res); 564 + if (IS_ERR(hdq_data->hdq_base)) 565 + return PTR_ERR(hdq_data->hdq_base); 568 566 569 567 hdq_data->hdq_usecount = 0; 570 568 mutex_init(&hdq_data->hdq_mutex);