From 6d4294d1634543853febc4287ecf02998fd234e1 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 21 Jan 2013 11:09:16 +0100 Subject: pwm: 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 Acked-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/pwm/pwm-tegra.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/pwm/pwm-tegra.c') diff --git a/drivers/pwm/pwm-tegra.c b/drivers/pwm/pwm-tegra.c index 30c0e2b70ce8..71900e8cd3d1 100644 --- a/drivers/pwm/pwm-tegra.c +++ b/drivers/pwm/pwm-tegra.c @@ -186,9 +186,9 @@ static int tegra_pwm_probe(struct platform_device *pdev) return -ENODEV; } - pwm->mmio_base = devm_request_and_ioremap(&pdev->dev, r); - if (!pwm->mmio_base) - return -EADDRNOTAVAIL; + pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r); + if (IS_ERR(pwm->mmio_base)) + return PTR_ERR(pwm->mmio_base); platform_set_drvdata(pdev, pwm); -- cgit v1.2.3