Skip to content

Commit 33cf756

Browse files
georgecherianmarckleinebudde
authored andcommitted
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: 32766ff 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: George Cherian <[email protected]> Signed-off-by: Mugunthan V N <[email protected]> Cc: linux-stable <[email protected]> # >= v3.11 Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 15ba223 commit 33cf756

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/can/c_can/c_can_platform.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,8 @@ static int c_can_plat_probe(struct platform_device *pdev)
287287
break;
288288
}
289289

290-
priv->raminit_ctrlreg = devm_ioremap_resource(&pdev->dev, res);
290+
priv->raminit_ctrlreg = devm_ioremap(&pdev->dev, res->start,
291+
resource_size(res));
291292
if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0)
292293
dev_info(&pdev->dev, "control memory is not used for raminit\n");
293294
else

0 commit comments

Comments
 (0)