Commit 32766fff authored by Tushar Behera's avatar Tushar Behera Committed by David S. Miller

net: can: Convert to use devm_ioremap_resource

Commit 75096579 ("lib: devres: Introduce devm_ioremap_resource()")
introduced devm_ioremap_resource() and deprecated the use of
devm_request_and_ioremap().
Signed-off-by: default avatarTushar 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: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent eed5d29d
...@@ -201,8 +201,8 @@ static int c_can_plat_probe(struct platform_device *pdev) ...@@ -201,8 +201,8 @@ static int c_can_plat_probe(struct platform_device *pdev)
priv->instance = pdev->id; priv->instance = pdev->id;
res = platform_get_resource(pdev, IORESOURCE_MEM, 1); res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
priv->raminit_ctrlreg = devm_request_and_ioremap(&pdev->dev, res); priv->raminit_ctrlreg = devm_ioremap_resource(&pdev->dev, res);
if (!priv->raminit_ctrlreg || priv->instance < 0) if (IS_ERR(priv->raminit_ctrlreg) || priv->instance < 0)
dev_info(&pdev->dev, "control memory is not used for raminit\n"); dev_info(&pdev->dev, "control memory is not used for raminit\n");
else else
priv->raminit = c_can_hw_raminit; priv->raminit = c_can_hw_raminit;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment