diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:09:18 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 21:21:47 +0100 |
commit | b0ee5605234a24f209b803f691957e5012eebf9a (patch) | |
tree | 498cf37959e4743600ded67456324fc6505de8b6 /drivers/spi/spi-mxs.c | |
parent | power: Convert to devm_ioremap_resource() (diff) | |
download | linux-b0ee5605234a24f209b803f691957e5012eebf9a.tar.xz linux-b0ee5605234a24f209b803f691957e5012eebf9a.zip |
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) if (!iores || irq_err < 0 || irq_dma < 0) return -EINVAL; - base = devm_request_and_ioremap(&pdev->dev, iores); - if (!base) - return -EADDRNOTAVAIL; + base = devm_ioremap_resource(&pdev->dev, iores); + if (IS_ERR(base)) + return PTR_ERR(base); pinctrl = devm_pinctrl_get_select_default(&pdev->dev); if (IS_ERR(pinctrl)) |