[PATCH 02/12] header: add mdiobus_is_registered_device()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This function was added to the mainline Linux kernel in commit 7f854420
"phy: Add API for {un}registering an mdio device to a bus."

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/phy.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/backport/backport-include/linux/phy.h b/backport/backport-include/linux/phy.h
index 739a831..3491f5a 100644
--- a/backport/backport-include/linux/phy.h
+++ b/backport/backport-include/linux/phy.h
@@ -14,6 +14,12 @@ static inline const char *phydev_name(const struct phy_device *phydev)
 {
 	return dev_name(&phydev->dev);
 }
+
+#define mdiobus_is_registered_device LINUX_BACKPORT(mdiobus_is_registered_device)
+static inline bool mdiobus_is_registered_device(struct mii_bus *bus, int addr)
+{
+	return bus->phy_map[addr];
+}
 #endif /* < 4.5 */
 
 #endif /* __BACKPORT_LINUX_PHY_H */
-- 
2.7.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux