提交 2de1d5e1 编写于 作者: S Sachin Kamat 提交者: Jeff Garzik

sata_rcar: Convert to devm_ioremap_resource()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() which provides more consistent error handling.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> 
Signed-off-by: NJeff Garzik <jgarzik@redhat.com>
上级 7551c40d
......@@ -17,6 +17,7 @@
#include <linux/libata.h>
#include <linux/platform_device.h>
#include <linux/clk.h>
#include <linux/err.h>
#define DRV_NAME "sata_rcar"
......@@ -799,9 +800,9 @@ static int sata_rcar_probe(struct platform_device *pdev)
host->private_data = priv;
priv->base = devm_request_and_ioremap(&pdev->dev, mem);
if (!priv->base) {
ret = -EADDRNOTAVAIL;
priv->base = devm_ioremap_resource(&pdev->dev, mem);
if (IS_ERR(priv->base)) {
ret = PTR_ERR(priv->base);
goto cleanup;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册