diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 05:09:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 15:21:47 -0500 |
commit | b0ee5605234a24f209b803f691957e5012eebf9a (patch) | |
tree | 498cf37959e4743600ded67456324fc6505de8b6 /drivers/spi/spi-mxs.c | |
parent | e2cbdf3cb72571f1231cd7c3cb14009f9b8df707 (diff) |
spi: 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>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/spi/spi-mxs.c')
-rw-r--r-- | drivers/spi/spi-mxs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c index a3ede249d05d..b735988641e0 100644 --- a/drivers/spi/spi-mxs.c +++ b/drivers/spi/spi-mxs.c | |||
@@ -538,9 +538,9 @@ static int mxs_spi_probe(struct platform_device *pdev) | |||
538 | if (!iores || irq_err < 0 || irq_dma < 0) | 538 | if (!iores || irq_err < 0 || irq_dma < 0) |
539 | return -EINVAL; | 539 | return -EINVAL; |
540 | 540 | ||
541 | base = devm_request_and_ioremap(&pdev->dev, iores); | 541 | base = devm_ioremap_resource(&pdev->dev, iores); |
542 | if (!base) | 542 | if (IS_ERR(base)) |
543 | return -EADDRNOTAVAIL; | 543 | return PTR_ERR(base); |
544 | 544 | ||
545 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); | 545 | pinctrl = devm_pinctrl_get_select_default(&pdev->dev); |
546 | if (IS_ERR(pinctrl)) | 546 | if (IS_ERR(pinctrl)) |