summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/litex
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-08-31 11:02:31 +0300
committerDavid S. Miller <davem@davemloft.net>2021-08-31 14:08:05 +0300
commit464a57281f29afc202905b456b0cb8bc729b383a (patch)
tree2144def87d008b6ca177287fc462763fb1559a0b /drivers/net/ethernet/litex
parent672a1c39495023e7e4e03f946ec792c17704267d (diff)
downloadlinux-464a57281f29afc202905b456b0cb8bc729b383a.tar.xz
net/mlxbf_gige: Make use of devm_platform_ioremap_resourcexxx()
Use the devm_platform_ioremap_resource_byname() helper instead of calling platform_get_resource_byname() and devm_ioremap_resource() separately Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing <caihuoqing@baidu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/litex')
-rw-r--r--drivers/net/ethernet/litex/litex_liteeth.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/net/ethernet/litex/litex_liteeth.c b/drivers/net/ethernet/litex/litex_liteeth.c
index 10e6f2dedfad..a9bdbf0dcfe1 100644
--- a/drivers/net/ethernet/litex/litex_liteeth.c
+++ b/drivers/net/ethernet/litex/litex_liteeth.c
@@ -227,7 +227,6 @@ static int liteeth_probe(struct platform_device *pdev)
{
struct net_device *netdev;
void __iomem *buf_base;
- struct resource *res;
struct liteeth *priv;
int irq, err;
@@ -249,13 +248,11 @@ static int liteeth_probe(struct platform_device *pdev)
}
netdev->irq = irq;
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mac");
- priv->base = devm_ioremap_resource(&pdev->dev, res);
+ priv->base = devm_platform_ioremap_resource_byname(pdev, "mac");
if (IS_ERR(priv->base))
return PTR_ERR(priv->base);
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "buffer");
- buf_base = devm_ioremap_resource(&pdev->dev, res);
+ buf_base = devm_platform_ioremap_resource_byname(pdev, "buffer");
if (IS_ERR(buf_base))
return PTR_ERR(buf_base);