net: phy: leds: Don't make our own link speed names
The phy core provides a handy phy_speed_to_str() helper, so use that instead of doing our own formatting of the different known link speeds. To do this, increase PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE to 11 so we can fit 'Unsupported' if necessary. Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
695bce8fd8
commit
457937bd2e
@@ -20,7 +20,7 @@ struct phy_device;
|
||||
#include <linux/leds.h>
|
||||
#include <linux/phy.h>
|
||||
|
||||
#define PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE 10
|
||||
#define PHY_LED_TRIGGER_SPEED_SUFFIX_SIZE 11
|
||||
|
||||
#define PHY_LINK_LED_TRIGGER_NAME_SIZE (MII_BUS_ID_SIZE + \
|
||||
FIELD_SIZEOF(struct mdio_device, addr)+\
|
||||
|
Reference in New Issue
Block a user