diff options
| author | YueHaibing <yuehaibing@huawei.com> | 2019-08-21 16:57:01 +0300 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2019-08-21 23:52:34 +0300 |
| commit | 2b9b5e74507fe8e6146b048c0dadbe2fe7b298e5 (patch) | |
| tree | 39bcd6ca5ac3e80f8f6a3e9aff8b85be389b730b | |
| parent | ad124aa34e514393218f46f9701fdeaf35cbf5d3 (diff) | |
| download | linux-2b9b5e74507fe8e6146b048c0dadbe2fe7b298e5.tar.xz | |
net: stmmac: dwc-qos: 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>
| -rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c index f2197b066ed1..dd9967aeda22 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-dwc-qos-eth.c @@ -418,7 +418,6 @@ static int dwc_eth_dwmac_probe(struct platform_device *pdev) const struct dwc_eth_dwmac_data *data; struct plat_stmmacenet_data *plat_dat; struct stmmac_resources stmmac_res; - struct resource *res; void *priv; int ret; @@ -435,8 +434,7 @@ static int dwc_eth_dwmac_probe(struct platform_device *pdev) return stmmac_res.irq; stmmac_res.wol_irq = stmmac_res.irq; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - stmmac_res.addr = devm_ioremap_resource(&pdev->dev, res); + stmmac_res.addr = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(stmmac_res.addr)) return PTR_ERR(stmmac_res.addr); |
