diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-01-23 14:20:44 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-01-27 09:27:04 +0100 |
commit | c1c2e56fb38c084e9e17d7bdae69eb3167f9a303 (patch) | |
tree | de1d78c12cfd16810c1e27d0398463ab67e017c9 /include | |
parent | 3f02bff2bf2f1cd85d070fbc11732d8024e683d3 (diff) | |
download | barebox-c1c2e56fb38c084e9e17d7bdae69eb3167f9a303.tar.gz barebox-c1c2e56fb38c084e9e17d7bdae69eb3167f9a303.tar.xz |
net: phy: Add static inline wrapper for phy_register_fixup_for_uid
Boards register a fixup for a phy without checking if phy support
is enabled. To fix compilation without phy support add a static
inline wrapper for phy_register_fixup_for_uid.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/phy.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 9994e1107d..c8980b0191 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -296,13 +296,22 @@ int phy_register_fixup(const char *bus_id, u32 phy_uid, u32 phy_uid_mask, int (*run)(struct phy_device *)); int phy_register_fixup_for_id(const char *bus_id, int (*run)(struct phy_device *)); -int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask, - int (*run)(struct phy_device *)); int phy_scan_fixups(struct phy_device *phydev); int phy_read_mmd_indirect(struct phy_device *phydev, int prtad, int devad); void phy_write_mmd_indirect(struct phy_device *phydev, int prtad, int devad, u16 data); +#ifdef CONFIG_PHYLIB +int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask, + int (*run)(struct phy_device *)); +#else +static inline int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask, + int (*run)(struct phy_device *)) +{ + return -ENOSYS; +} +#endif + extern struct bus_type mdio_bus_type; #endif /* __PHYDEV_H__ */ |