This source file includes following definitions.
- can_led_event
- devm_can_led_init
- can_led_notifier_init
- can_led_notifier_exit
1
2
3
4
5
6 #ifndef _CAN_LED_H
7 #define _CAN_LED_H
8
9 #include <linux/if.h>
10 #include <linux/leds.h>
11 #include <linux/netdevice.h>
12
13 enum can_led_event {
14 CAN_LED_EVENT_OPEN,
15 CAN_LED_EVENT_STOP,
16 CAN_LED_EVENT_TX,
17 CAN_LED_EVENT_RX,
18 };
19
20 #ifdef CONFIG_CAN_LEDS
21
22
23
24
25 #define CAN_LED_NAME_SZ (IFNAMSIZ + 6)
26
27 void can_led_event(struct net_device *netdev, enum can_led_event event);
28 void devm_can_led_init(struct net_device *netdev);
29 int __init can_led_notifier_init(void);
30 void __exit can_led_notifier_exit(void);
31
32 #else
33
34 static inline void can_led_event(struct net_device *netdev,
35 enum can_led_event event)
36 {
37 }
38 static inline void devm_can_led_init(struct net_device *netdev)
39 {
40 }
41 static inline int can_led_notifier_init(void)
42 {
43 return 0;
44 }
45 static inline void can_led_notifier_exit(void)
46 {
47 }
48
49 #endif
50
51 #endif