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-sirf.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-sirf.c')
-rw-r--r-- | drivers/spi/spi-sirf.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/spi/spi-sirf.c b/drivers/spi/spi-sirf.c index e0f43a512e84..78c8842b9501 100644 --- a/drivers/spi/spi-sirf.c +++ b/drivers/spi/spi-sirf.c | |||
@@ -535,10 +535,9 @@ static int spi_sirfsoc_probe(struct platform_device *pdev) | |||
535 | } | 535 | } |
536 | } | 536 | } |
537 | 537 | ||
538 | sspi->base = devm_request_and_ioremap(&pdev->dev, mem_res); | 538 | sspi->base = devm_ioremap_resource(&pdev->dev, mem_res); |
539 | if (!sspi->base) { | 539 | if (IS_ERR(sspi->base)) { |
540 | dev_err(&pdev->dev, "IO remap failed!\n"); | 540 | ret = PTR_ERR(sspi->base); |
541 | ret = -ENOMEM; | ||
542 | goto free_master; | 541 | goto free_master; |
543 | } | 542 | } |
544 | 543 | ||