From 903b33e0292465ebe9705a70084bf9ad06a8a2a5 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:08:57 +0100 Subject: amba: 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: Russell King Signed-off-by: Greg Kroah-Hartman --- drivers/amba/tegra-ahb.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/amba/tegra-ahb.c') diff --git a/drivers/amba/tegra-ahb.c b/drivers/amba/tegra-ahb.c index 536c166f425..ab92785f54d 100644 --- a/drivers/amba/tegra-ahb.c +++ b/drivers/amba/tegra-ahb.c @@ -20,6 +20,7 @@ * */ +#include #include #include #include @@ -257,9 +258,9 @@ static int tegra_ahb_probe(struct platform_device *pdev) res = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res) return -ENODEV; - ahb->regs = devm_request_and_ioremap(&pdev->dev, res); - if (!ahb->regs) - return -EBUSY; + ahb->regs = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(ahb->regs)) + return PTR_ERR(ahb->regs); ahb->dev = &pdev->dev; platform_set_drvdata(pdev, ahb); -- cgit v1.2.3-70-g09d2