From b0ee5605234a24f209b803f691957e5012eebf9a Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:18 +0100 Subject: 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 Cc: Grant Likely Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-tegra20-sflash.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'drivers/spi/spi-tegra20-sflash.c') diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c index 448a8cc71df3..69c9d23bd472 100644 --- a/drivers/spi/spi-tegra20-sflash.c +++ b/drivers/spi/spi-tegra20-sflash.c @@ -508,11 +508,9 @@ static int tegra_sflash_probe(struct platform_device *pdev) ret = -ENODEV; goto exit_free_master; } - tsd->base = devm_request_and_ioremap(&pdev->dev, r); - if (!tsd->base) { - dev_err(&pdev->dev, - "Cannot request memregion/iomap dma address\n"); - ret = -EADDRNOTAVAIL; + tsd->base = devm_ioremap_resource(&pdev->dev, r); + if (IS_ERR(tsd->base)) { + ret = PTR_ERR(tsd->base); goto exit_free_master; } -- cgit v1.2.1