phy: Centralise print about attached phy

Many Ethernet drivers contain the same netdev_info() print statement
about the attached phy. Move it into the phy device code. Additionally
add a varargs function which can be used to append additional
information.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Andrew Lunn
2016-01-06 20:11:13 +01:00
committed by David S. Miller
parent 053e7e1692
commit 2220943a21
25 changed files with 64 additions and 82 deletions

View File

@@ -16,6 +16,7 @@
#ifndef __PHY_H
#define __PHY_H
#include <linux/compiler.h>
#include <linux/spinlock.h>
#include <linux/ethtool.h>
#include <linux/mdio.h>
@@ -785,6 +786,9 @@ static inline const char *phydev_name(const struct phy_device *phydev)
return dev_name(&phydev->dev);
}
void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
__printf(2, 3);
void phy_attached_info(struct phy_device *phydev);
int genphy_config_init(struct phy_device *phydev);
int genphy_setup_forced(struct phy_device *phydev);
int genphy_restart_aneg(struct phy_device *phydev);