diff options
author | George Cherian <george.cherian@ti.com> | 2014-07-25 10:19:41 +0400 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2014-07-25 11:23:08 +0400 |
commit | 33cf75656923ff11d67a937a4f8e9344f58cea77 (patch) | |
tree | c6afe9a118ea37be300b3957262d84dd272e40c2 /drivers/net/can | |
parent | 15ba2236f3556fc01b9ca91394465152b5ea74b6 (diff) | |
download | linux-33cf75656923ff11d67a937a4f8e9344f58cea77.tar.xz |
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 <george.cherian@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Cc: linux-stable <stable@vger.kernel.org> # >= v3.11
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r-- | drivers/net/can/c_can/c_can_platform.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c index 824108cd9fd5..12430be6448a 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -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 |