1 From 947acacab5ea151291b861cdfbde16ff5cf1b08c Mon Sep 17 00:00:00 2001
2 From: Christian Marangi <ansuelsmth@gmail.com>
3 Date: Mon, 29 May 2023 18:32:41 +0200
4 Subject: [PATCH 11/13] leds: trigger: netdev: expose netdev trigger modes in
7 Expose netdev trigger modes to make them accessible by LED driver that
8 will support netdev trigger for hw control.
10 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
11 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
14 drivers/leds/trigger/ledtrig-netdev.c | 9 ---------
15 include/linux/leds.h | 10 ++++++++++
16 2 files changed, 10 insertions(+), 9 deletions(-)
18 --- a/drivers/leds/trigger/ledtrig-netdev.c
19 +++ b/drivers/leds/trigger/ledtrig-netdev.c
20 @@ -56,15 +56,6 @@ struct led_netdev_data {
24 -enum led_trigger_netdev_modes {
25 - TRIGGER_NETDEV_LINK = 0,
30 - __TRIGGER_NETDEV_MAX,
33 static void set_baseline_state(struct led_netdev_data *trigger_data)
35 int current_brightness;
36 --- a/include/linux/leds.h
37 +++ b/include/linux/leds.h
38 @@ -527,6 +527,16 @@ static inline void *led_get_trigger_data
40 #endif /* CONFIG_LEDS_TRIGGERS */
42 +/* Trigger specific enum */
43 +enum led_trigger_netdev_modes {
44 + TRIGGER_NETDEV_LINK = 0,
49 + __TRIGGER_NETDEV_MAX,
52 /* Trigger specific functions */
53 #ifdef CONFIG_LEDS_TRIGGER_DISK
54 void ledtrig_disk_activity(bool write);