linux/net/rfkill
Henrique de Moraes Holschuh 37f55e9d78 rfkill: fix led-trigger unregister order in error unwind
rfkill needs to unregister the led trigger AFTER a call to
rfkill_remove_switch(), otherwise it will not update the LED state,
possibly leaving it ON when it should be OFF.

To make led-trigger unregistering safer, guard against unregistering a
trigger twice, and also against issuing trigger events to a led trigger
that was unregistered.  This makes the error unwind paths more resilient.

Refer to "rfkill: Register LED triggers before registering switch".

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
Cc: Michael Buesch <mb@bu3sch.de>
Cc: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2008-07-29 16:36:32 -04:00
..
Kconfig [RFKILL]: Add support for an rfkill LED. 2007-10-10 16:54:10 -07:00
Makefile [NET]: rfkill: add support for input key to control wireless radio 2007-05-07 00:34:20 -07:00
rfkill-input.c rfkill: rename the rfkill_state states and add block-locked state 2008-06-26 14:21:22 -04:00
rfkill-input.h rfkill: do not allow userspace to override ALL RADIOS OFF 2008-06-26 14:21:22 -04:00
rfkill.c rfkill: fix led-trigger unregister order in error unwind 2008-07-29 16:36:32 -04:00