diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2016-02-13 11:44:04 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2016-02-15 16:11:36 +0100 |
commit | 0b5bbf2b09589a88c662279304882cc20a4083b5 (patch) | |
tree | aaf40c3c31dfcb105bd8d8bea3fbb9c33c92110a /backport/backport-include | |
parent | ad323696d5970de979edbeca77cbcbd8c71685b0 (diff) |
backports: add phy_attached_info()
This function was added to the mainline Linux kernel in commit
2220943a2 "phy: Centralise print about attached phy".
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'backport/backport-include')
-rw-r--r-- | backport/backport-include/linux/phy.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/backport/backport-include/linux/phy.h b/backport/backport-include/linux/phy.h index 3491f5a8..1c75dc6a 100644 --- a/backport/backport-include/linux/phy.h +++ b/backport/backport-include/linux/phy.h @@ -1,6 +1,7 @@ #ifndef __BACKPORT_LINUX_PHY_H #define __BACKPORT_LINUX_PHY_H #include_next <linux/phy.h> +#include <linux/compiler.h> #include <linux/version.h> #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0)) @@ -20,6 +21,12 @@ static inline bool mdiobus_is_registered_device(struct mii_bus *bus, int addr) { return bus->phy_map[addr]; } + +#define phy_attached_print LINUX_BACKPORT(phy_attached_print) +void phy_attached_print(struct phy_device *phydev, const char *fmt, ...) + __printf(2, 3); +#define phy_attached_info LINUX_BACKPORT(phy_attached_info) +void phy_attached_info(struct phy_device *phydev); #endif /* < 4.5 */ #endif /* __BACKPORT_LINUX_PHY_H */ |