mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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:
parent
695bce8fd8
commit
457937bd2e
2 changed files with 3 additions and 14 deletions
|
@ -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)+\
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue