summaryrefslogtreecommitdiff
path: root/drivers/pwm/pwm-imx.c
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2013-01-21 11:09:16 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-22 11:41:57 -0800
commit6d4294d1634543853febc4287ecf02998fd234e1 (patch)
tree1614d14d3879557860ae9d78169e555f67c70170 /drivers/pwm/pwm-imx.c
parent9e0c1fb29a7c257a31c321c2437617b6b4d66168 (diff)
downloadlwn-6d4294d1634543853febc4287ecf02998fd234e1.tar.gz
lwn-6d4294d1634543853febc4287ecf02998fd234e1.zip
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 <thierry.reding@avionic-design.de> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/pwm/pwm-imx.c')
-rw-r--r--drivers/pwm/pwm-imx.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 65a86bdeabed..3f5677b7690e 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -274,9 +274,9 @@ static int imx_pwm_probe(struct platform_device *pdev)
return -ENODEV;
}
- imx->mmio_base = devm_request_and_ioremap(&pdev->dev, r);
- if (imx->mmio_base == NULL)
- return -EADDRNOTAVAIL;
+ imx->mmio_base = devm_ioremap_resource(&pdev->dev, r);
+ if (IS_ERR(imx->mmio_base))
+ return PTR_ERR(imx->mmio_base);
data = of_id->data;
imx->config = data->config;