提交 33cf7565 编写于 作者: G George Cherian 提交者: Marc Kleine-Budde

can: c_can_platform: Fix raminit, use devm_ioremap() instead of devm_ioremap_resource()

The raminit register is shared register for both can0 and can1. Since commit:

    32766fff net: can: Convert to use devm_ioremap_resource

devm_ioremap_resource() is used to map raminit register. When using both
interfaces the mapping for the can1 interface fails, leading to a non
functional can interface.
Signed-off-by: NGeorge Cherian <george.cherian@ti.com>
Signed-off-by: NMugunthan V N <mugunthanvnm@ti.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v3.11
Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
上级 15ba2236
......@@ -287,7 +287,8 @@ static int c_can_plat_probe(struct platform_device *pdev)
break;
}
priv->raminit_ctrlreg = devm_ioremap_resource(&pdev->dev, res);
priv->raminit_ctrlreg = devm_ioremap(&pdev->dev, res->start,
resource_size(res));
if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0)
dev_info(&pdev->dev, "control memory is not used for raminit\n");
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册