diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-08-21 15:33:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-08-21 22:52:33 +0200 |
commit | 37f76049b095da153efa047538f73b1af8dfbc6a (patch) | |
tree | eb6a32b87550271e6aaaa528aff0a7c465d9da4b /drivers/net/ethernet/marvell | |
parent | net: fec: use devm_platform_ioremap_resource() to simplify code (diff) | |
download | linux-37f76049b095da153efa047538f73b1af8dfbc6a.tar.xz linux-37f76049b095da153efa047538f73b1af8dfbc6a.zip |
net: mvneta: use devm_platform_ioremap_resource() to simplify code
Use devm_platform_ioremap_resource() to simplify the code a bit.
This is detected by coccinelle.
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell')
-rw-r--r-- | drivers/net/ethernet/marvell/mvneta_bm.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/marvell/mvneta_bm.c b/drivers/net/ethernet/marvell/mvneta_bm.c index 82ee2bcca6fd..46c942ef2287 100644 --- a/drivers/net/ethernet/marvell/mvneta_bm.c +++ b/drivers/net/ethernet/marvell/mvneta_bm.c @@ -411,15 +411,13 @@ static int mvneta_bm_probe(struct platform_device *pdev) { struct device_node *dn = pdev->dev.of_node; struct mvneta_bm *priv; - struct resource *res; int err; priv = devm_kzalloc(&pdev->dev, sizeof(struct mvneta_bm), GFP_KERNEL); if (!priv) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - priv->reg_base = devm_ioremap_resource(&pdev->dev, res); + priv->reg_base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(priv->reg_base)) return PTR_ERR(priv->reg_base); |