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-pxa.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/pwm/pwm-pxa.c') diff --git a/drivers/pwm/pwm-pxa.c b/drivers/pwm/pwm-pxa.c index f32fc4e66e0c..20370e61de5a 100644 --- a/drivers/pwm/pwm-pxa.c +++ b/drivers/pwm/pwm-pxa.c @@ -165,9 +165,9 @@ static int pwm_probe(struct platform_device *pdev) return -ENODEV; } - pwm->mmio_base = devm_request_and_ioremap(&pdev->dev, r); - if (pwm->mmio_base == NULL) - return -EADDRNOTAVAIL; + pwm->mmio_base = devm_ioremap_resource(&pdev->dev, r); + if (IS_ERR(pwm->mmio_base)) + return PTR_ERR(pwm->mmio_base); ret = pwmchip_add(&pwm->chip); if (ret < 0) { -- cgit v1.2.2