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-spear.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/pwm/pwm-spear.c') diff --git a/drivers/pwm/pwm-spear.c b/drivers/pwm/pwm-spear.c index 83b21d9d5cf9..69a2d9eb34db 100644 --- a/drivers/pwm/pwm-spear.c +++ b/drivers/pwm/pwm-spear.c @@ -192,9 +192,9 @@ static int spear_pwm_probe(struct platform_device *pdev) return -ENOMEM; } - pc->mmio_base = devm_request_and_ioremap(&pdev->dev, r); - if (!pc->mmio_base) - return -EADDRNOTAVAIL; + pc->mmio_base = devm_ioremap_resource(&pdev->dev, r); + if (IS_ERR(pc->mmio_base)) + return PTR_ERR(pc->mmio_base); pc->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(pc->clk)) -- cgit v1.2.3