1 From 9198f241a7205bd85b89bda08fce5c2446a12e23 Mon Sep 17 00:00:00 2001
2 From: Joakim Zhang <qiangqing.zhang@nxp.com>
3 Date: Sun, 29 Sep 2019 08:32:09 +0000
4 Subject: [PATCH] can: flexcan: use devm_platform_ioremap_resource() to
7 Use the new helper devm_platform_ioremap_resource() which wraps the
8 platform_get_resource() and devm_ioremap_resource() together to simplify
11 Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
12 Reviewed-by: Sean Nyekjaer <sean@geanix.com>
13 Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
15 drivers/net/can/flexcan.c | 4 +---
16 1 file changed, 1 insertion(+), 3 deletions(-)
18 --- a/drivers/net/can/flexcan.c
19 +++ b/drivers/net/can/flexcan.c
20 @@ -1570,7 +1570,6 @@ static int flexcan_probe(struct platform
21 struct net_device *dev;
22 struct flexcan_priv *priv;
23 struct regulator *reg_xceiver;
24 - struct resource *mem;
25 struct clk *clk_ipg = NULL, *clk_per = NULL;
26 struct flexcan_regs __iomem *regs;
28 @@ -1605,12 +1604,11 @@ static int flexcan_probe(struct platform
29 clock_freq = clk_get_rate(clk_per);
32 - mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
33 irq = platform_get_irq(pdev, 0);
37 - regs = devm_ioremap_resource(&pdev->dev, mem);
38 + regs = devm_platform_ioremap_resource(pdev, 0);