From: Thierry Reding Date: Mon, 21 Jan 2013 10:08:58 +0000 (+0100) Subject: [libata] Convert to devm_ioremap_resource() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9b2b1ca5b738727707d1c9d5dbc70b1a0a813467;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [libata] 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. Signed-off-by: Thierry Reding Cc: linux-ide@vger.kernel.org Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/pata_ep93xx.c b/drivers/ata/pata_ep93xx.c index 556222f04731..c1bfaf43d109 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; }