net: can: Convert to use devm_ioremap_resource
authorTushar Behera <tushar.behera@linaro.org>
Mon, 10 Jun 2013 11:35:07 +0000 (17:05 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Jun 2013 09:22:35 +0000 (02:22 -0700)
Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().

Signed-off-by: Tushar Behera <tushar.behera@linaro.org>
CC: netdev@vger.kernel.org
CC: linux-can@vger.kernel.org
CC: Marc Kleine-Budde <mkl@pengutronix.de>
CC: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/can/c_can/c_can_platform.c

index 6b6130b8bdc4c3d58489e1b920fc6d81c6ad0454..b918c73294265fdcf56737d20c6761cefd82874e 100644 (file)
@@ -201,8 +201,8 @@ static int c_can_plat_probe(struct platform_device *pdev)
                        priv->instance = pdev->id;
 
                res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-               priv->raminit_ctrlreg = devm_request_and_ioremap(&pdev->dev, res);
-               if (!priv->raminit_ctrlreg || priv->instance < 0)
+               priv->raminit_ctrlreg = devm_ioremap_resource(&pdev->dev, res);
+               if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0)
                        dev_info(&pdev->dev, "control memory is not used for raminit\n");
                else
                        priv->raminit = c_can_hw_raminit;