[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210611105401.270673-5-ciorneiioana@gmail.com>
Date: Fri, 11 Jun 2021 13:53:50 +0300
From: Ioana Ciornei <ciorneiioana@...il.com>
To: davem@...emloft.net, kuba@...nel.org, hkallweit1@...il.com,
netdev@...r.kernel.org, Grant Likely <grant.likely@....com>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Jeremy Linton <jeremy.linton@....com>,
Andrew Lunn <andrew@...n.ch>,
Andy Shevchenko <andy.shevchenko@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Russell King - ARM Linux admin <linux@...linux.org.uk>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Marcin Wojtas <mw@...ihalf.com>,
Pieter Jansen Van Vuuren <pieter.jansenvv@...boosystems.io>,
Jon <jon@...id-run.com>, Saravana Kannan <saravanak@...gle.com>,
Randy Dunlap <rdunlap@...radead.org>,
calvin.johnson@....nxp.com
Cc: Cristi Sovaiala <cristian.sovaiala@....com>,
Florin Laurentiu Chiculita <florinlaurentiu.chiculita@....com>,
Madalin Bucur <madalin.bucur@....com>,
linux-arm-kernel@...ts.infradead.org,
Diana Madalina Craciun <diana.craciun@....com>,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org,
linux.cj@...il.com, Laurentiu Tudor <laurentiu.tudor@....com>,
Len Brown <lenb@...nel.org>,
"Rafael J . Wysocki" <rjw@...ysocki.net>,
Ioana Ciornei <ioana.ciornei@....com>
Subject: [PATCH net-next v9 04/15] of: mdio: Refactor of_phy_find_device()
From: Calvin Johnson <calvin.johnson@....nxp.com>
Refactor of_phy_find_device() to use fwnode_phy_find_device().
Signed-off-by: Calvin Johnson <calvin.johnson@....nxp.com>
Signed-off-by: Ioana Ciornei <ioana.ciornei@....com>
Acked-by: Grant Likely <grant.likely@....com>
---
Changes in v9: None
Changes in v8: None
Changes in v7: None
Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None
drivers/net/mdio/of_mdio.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c
index 6ef8b6e40189..0ba1158796d9 100644
--- a/drivers/net/mdio/of_mdio.c
+++ b/drivers/net/mdio/of_mdio.c
@@ -360,18 +360,7 @@ EXPORT_SYMBOL(of_mdio_find_device);
*/
struct phy_device *of_phy_find_device(struct device_node *phy_np)
{
- struct mdio_device *mdiodev;
-
- mdiodev = of_mdio_find_device(phy_np);
- if (!mdiodev)
- return NULL;
-
- if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY)
- return to_phy_device(&mdiodev->dev);
-
- put_device(&mdiodev->dev);
-
- return NULL;
+ return fwnode_phy_find_device(of_fwnode_handle(phy_np));
}
EXPORT_SYMBOL(of_phy_find_device);
--
2.31.1
Powered by blists - more mailing lists