Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759074AbaGYGUT (ORCPT ); Fri, 25 Jul 2014 02:20:19 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:50094 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758834AbaGYGUR (ORCPT ); Fri, 25 Jul 2014 02:20:17 -0400 From: Mugunthan V N To: Wolfgang Grandegger CC: Marc Kleine-Budde , Pavel Machek , Thor Thayer , Prabhakar Lad , Thomas Gleixner , Wolfram Sang , Chen Gang , George Cherian , , , , Mugunthan V N Subject: [can-next PATCH 1/1] net: can: c_can_platform: Use devm_ioremap instead of devm_ioremap_resource. Date: Fri, 25 Jul 2014 11:49:41 +0530 Message-ID: <1406269181-4092-1-git-send-email-mugunthanvnm@ti.com> X-Mailer: git-send-email 2.0.2.673.g9ab0882 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: George Cherian The raminit register is shared register for both can0 and can1. Using devm_ioremap_resource fails the mapping for can1 interface leading to a non functional can interface. Signed-off-by: George Cherian Signed-off-by: Mugunthan V N --- drivers/net/can/c_can/c_can_platform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c index e29b6d0..5dede6e 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c @@ -278,7 +278,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 -- 2.0.2.673.g9ab0882 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/