From patchwork Mon Jan 21 10:08:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [05/33] ata: Convert to devm_ioremap_resource() Date: Mon, 21 Jan 2013 00:08:58 -0000 From: Thierry Reding X-Patchwork-Id: 214062 Message-Id: <1358762966-20791-6-git-send-email-thierry.reding@avionic-design.de> To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Dmitry Torokhov , Arnd Bergmann , Wolfram Sang , Jeff Garzik , linux-ide@vger.kernel.org Convert all uses of devm_request_and_ioremap() to the newly introduced devm_ioremap_resource() which provides more consistent error handling. Signed-off-by: Thierry Reding Cc: Jeff Garzik Cc: linux-ide@vger.kernel.org --- drivers/ata/pata_ep93xx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index 556222f..c1bfaf4 100644 --- a/drivers/ata/pata_ep93xx.c +++ b/drivers/ata/pata_ep93xx.c @@ -31,6 +31,7 @@ * Copyright (C) 2006 Tower Technologies */ +#include #include #include #include @@ -937,9 +938,9 @@ static int ep93xx_pata_probe(struct platform_device *pdev) goto err_rel_gpio; } - ide_base = devm_request_and_ioremap(&pdev->dev, mem_res); - if (!ide_base) { - err = -ENXIO; + ide_base = devm_ioremap_resource(&pdev->dev, mem_res); + if (IS_ERR(ide_base)) { + err = PTR_ERR(ide_base); goto err_rel_gpio; }