diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 14:09:18 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-26 00:21:47 +0400 |
commit | b0ee5605234a24f209b803f691957e5012eebf9a (patch) | |
tree | 498cf37959e4743600ded67456324fc6505de8b6 /drivers/spi/spi-tegra20-slink.c | |
parent | e2cbdf3cb72571f1231cd7c3cb14009f9b8df707 (diff) | |
download | linux-b0ee5605234a24f209b803f691957e5012eebf9a.tar.xz |
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-tegra20-slink.c')
-rw-r--r-- | drivers/spi/spi-tegra20-slink.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c index 651167f2e0af..96bd6c25a0fc 100644 --- a/drivers/spi/spi-tegra20-slink.c +++ b/drivers/spi/spi-tegra20-slink.c @@ -1172,11 +1172,9 @@ static int tegra_slink_probe(struct platform_device *pdev) goto exit_free_master; } tspi->phys = r->start; - tspi->base = devm_request_and_ioremap(&pdev->dev, r); - if (!tspi->base) { - dev_err(&pdev->dev, - "Cannot request memregion/iomap dma address\n"); - ret = -EADDRNOTAVAIL; + tspi->base = devm_ioremap_resource(&pdev->dev, r); + if (IS_ERR(tspi->base)) { + ret = PTR_ERR(tspi->base); goto exit_free_master; } |