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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
9e0c1fb29a
commit
6d4294d163
@@ -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))
|
||||
|
Reference in New Issue
Block a user