diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:09:16 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-22 20:41:57 +0100 |
commit | 6d4294d1634543853febc4287ecf02998fd234e1 (patch) | |
tree | 1614d14d3879557860ae9d78169e555f67c70170 /drivers/pwm/pwm-tiehrpwm.c | |
parent | pinctrl: Convert to devm_ioremap_resource() (diff) | |
download | linux-6d4294d1634543853febc4287ecf02998fd234e1.tar.xz linux-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-tiehrpwm.c')
-rw-r--r-- | drivers/pwm/pwm-tiehrpwm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/pwm/pwm-tiehrpwm.c b/drivers/pwm/pwm-tiehrpwm.c index 72a6dd40c9ec..5a1399580533 100644 --- a/drivers/pwm/pwm-tiehrpwm.c +++ b/drivers/pwm/pwm-tiehrpwm.c @@ -453,9 +453,9 @@ static int ehrpwm_pwm_probe(struct platform_device *pdev) return -ENODEV; } - 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); /* Acquire tbclk for Time Base EHRPWM submodule */ pc->tbclk = devm_clk_get(&pdev->dev, "tbclk"); |