Skip to content

Commit

Permalink
[libata] Convert to devm_ioremap_resource()
Browse files Browse the repository at this point in the history
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 <thierry.reding@avionic-design.de>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Thierry Reding authored and Jeff Garzik committed Feb 20, 2013
1 parent 163cf81 commit 9b2b1ca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/ata/pata_ep93xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
* Copyright (C) 2006 Tower Technologies
*/

#include <linux/err.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 9b2b1ca

Please sign in to comment.