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-omap2-mcspi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'drivers/spi/spi-omap2-mcspi.c') diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c index b610f522ca44..71a9482f0acc 100644 --- a/drivers/spi/spi-omap2-mcspi.c +++ b/drivers/spi/spi-omap2-mcspi.c @@ -1204,10 +1204,9 @@ static int omap2_mcspi_probe(struct platform_device *pdev) r->end += regs_offset; mcspi->phys = r->start; - mcspi->base = devm_request_and_ioremap(&pdev->dev, r); - if (!mcspi->base) { - dev_dbg(&pdev->dev, "can't ioremap MCSPI\n"); - status = -ENOMEM; + mcspi->base = devm_ioremap_resource(&pdev->dev, r); + if (IS_ERR(mcspi->base)) { + status = PTR_ERR(mcspi->base); goto free_master; } -- cgit v1.2.3