OSDN Git Service

leds: trigger: netdev: Drop NETDEV_LED_MODE_LINKUP from mode
authorChristian Marangi <ansuelsmth@gmail.com>
Wed, 19 Apr 2023 21:07:40 +0000 (23:07 +0200)
committerLee Jones <lee@kernel.org>
Thu, 25 May 2023 11:07:35 +0000 (12:07 +0100)
commite2f24cb1b5daf9a4f6f3ba574c1fa74aab9807a4
treedc22e87826c1870cf75697f29698d7f400e69e94
parentcee4bd16c3195a701be683f7da9e88c6e11acb73
leds: trigger: netdev: Drop NETDEV_LED_MODE_LINKUP from mode

Putting NETDEV_LED_MODE_LINKUP in the same list of the netdev trigger
modes is wrong as it's used to set the link state of the device and not
to set a blink mode as it's done by NETDEV_LED_LINK, NETDEV_LED_TX and
NETDEV_LED_RX. It's also wrong to put this state in the same bitmap of the
netdev trigger mode and should be external to it.

Drop NETDEV_LED_MODE_LINKUP from mode list and convert to a simple bool
that will be true or false based on the carrier link. No functional
change intended.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Lee Jones <lee@kernel.org>
Link: https://lore.kernel.org/r/20230419210743.3594-3-ansuelsmth@gmail.com
drivers/leds/trigger/ledtrig-netdev.c