提交 e07a8943 编写于 作者: S Sachin Kamat 提交者: Dmitry Torokhov

Input: apbps2 - convert to devm_ioremap_resource()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.

devm_ioremap_resource() provides its own error messages; so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 39fbe585
...@@ -147,11 +147,9 @@ static int apbps2_of_probe(struct platform_device *ofdev) ...@@ -147,11 +147,9 @@ static int apbps2_of_probe(struct platform_device *ofdev)
/* Find Device Address */ /* Find Device Address */
res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); res = platform_get_resource(ofdev, IORESOURCE_MEM, 0);
priv->regs = devm_request_and_ioremap(&ofdev->dev, res); priv->regs = devm_ioremap_resource(&ofdev->dev, res);
if (!priv->regs) { if (IS_ERR(priv->regs))
dev_err(&ofdev->dev, "io-regs mapping failed\n"); return PTR_ERR(priv->regs);
return -EBUSY;
}
/* Reset hardware, disable interrupt */ /* Reset hardware, disable interrupt */
iowrite32be(0, &priv->regs->ctrl); iowrite32be(0, &priv->regs->ctrl);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册