summaryrefslogtreecommitdiff
path: root/drivers/net/mdio
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-08-31 15:56:58 +0800
committerDavid S. Miller <davem@davemloft.net>2021-08-31 12:05:51 +0100
commitfa14d03e014a130839f9dc1b97ea61fe598d873d (patch)
tree83ab57eb3db0433557ff2f29b77bc1e18aea34b0 /drivers/net/mdio
parent8d65cd8d25fa23951171094553901d69a88ccdff (diff)
net: mdio-ipq4019: Make use of devm_platform_ioremap_resource()
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/mdio')
-rw-r--r--drivers/net/mdio/mdio-ipq4019.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/mdio/mdio-ipq4019.c b/drivers/net/mdio/mdio-ipq4019.c
index 14e08b786334..0d7d3e15d2f0 100644
--- a/drivers/net/mdio/mdio-ipq4019.c
+++ b/drivers/net/mdio/mdio-ipq4019.c
@@ -207,7 +207,6 @@ static int ipq4019_mdio_probe(struct platform_device *pdev)
{
struct ipq4019_mdio_data *priv;
struct mii_bus *bus;
- struct resource *res;
int ret;
bus = devm_mdiobus_alloc_size(&pdev->dev, sizeof(*priv));
@@ -225,9 +224,7 @@ static int ipq4019_mdio_probe(struct platform_device *pdev)
return PTR_ERR(priv->mdio_clk);
/* The platform resource is provided on the chipset IPQ5018 */
- res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- if (res)
- priv->eth_ldo_rdy = devm_ioremap_resource(&pdev->dev, res);
+ priv->eth_ldo_rdy = devm_platform_ioremap_resource(pdev, 1);
bus->name = "ipq4019_mdio";
bus->read = ipq4019_mdio_read;