Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net: emaclite: Use devm_platform_get_and_ioremap_resource() in xemaclite_of_probe()

A wrapper function is available since the commit 890cc39a8799
("drivers: provide devm_platform_get_and_ioremap_resource()").
Thus reuse existing functionality instead of keeping duplicate source code.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Link: https://lore.kernel.org/r/f87065d0-e398-4ffa-bfa4-9ff99d73f206@web.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Markus Elfring and committed by
Jakub Kicinski
709990df 4a49c88e

+1 -2
+1 -2
drivers/net/ethernet/xilinx/xilinx_emaclite.c
··· 1114 1114 1115 1115 ndev->irq = rc; 1116 1116 1117 - res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); 1118 - lp->base_addr = devm_ioremap_resource(&ofdev->dev, res); 1117 + lp->base_addr = devm_platform_get_and_ioremap_resource(ofdev, 0, &res); 1119 1118 if (IS_ERR(lp->base_addr)) { 1120 1119 rc = PTR_ERR(lp->base_addr); 1121 1120 goto error;