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-mxs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/spi/spi-mxs.c') 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)) -- cgit v1.2.3-58-ga151