diff options
-rw-r--r-- | backport/backport-include/linux/phy.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/backport/backport-include/linux/phy.h b/backport/backport-include/linux/phy.h index 4473e4ed..739a8319 100644 --- a/backport/backport-include/linux/phy.h +++ b/backport/backport-include/linux/phy.h @@ -8,4 +8,12 @@ phy_connect(dev, bus_id, handler, 0, interface) #endif +#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,5,0)) +#define phydev_name LINUX_BACKPORT(phydev_name) +static inline const char *phydev_name(const struct phy_device *phydev) +{ + return dev_name(&phydev->dev); +} +#endif /* < 4.5 */ + #endif /* __BACKPORT_LINUX_PHY_H */ |