mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
rfkill: add notifier chains support
Add a notifier chain for use by the rfkill class. This notifier chain signals the following events (more to be added when needed): 1. rfkill: rfkill device state has changed A pointer to the rfkill struct will be passed as a parameter. The notifier message types have been added to include/linux/rfkill.h instead of to include/linux/notifier.h in order to avoid the madness of modifying a header used globally (and that triggers an almost full tree rebuild every time it is touched) with information that is of interest only to code that includes the rfkill.h header. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Acked-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
526324b61a
commit
79399a8d19
2 changed files with 74 additions and 3 deletions
|
@ -117,4 +117,11 @@ static inline char *rfkill_get_led_name(struct rfkill *rfkill)
|
|||
#endif
|
||||
}
|
||||
|
||||
/* rfkill notification chain */
|
||||
#define RFKILL_STATE_CHANGED 0x0001 /* state of a normal rfkill
|
||||
switch has changed */
|
||||
|
||||
int register_rfkill_notifier(struct notifier_block *nb);
|
||||
int unregister_rfkill_notifier(struct notifier_block *nb);
|
||||
|
||||
#endif /* RFKILL_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue