From 2fd9b2212e25e6411b6f309707f4e2683d164250 Mon Sep 17 00:00:00 2001 From: Henrique de Moraes Holschuh Date: Mon, 21 Jul 2008 21:18:17 -0300 Subject: rfkill: document rfkill_force_state as required (v2) While the rfkill class does work with just get_state(), it doesn't work well on devices that are subject to external events that cause rfkill state changes. Document that rfkill_force_state() is required in those cases. Signed-off-by: Henrique de Moraes Holschuh Acked-by: Ivo van Doorn Signed-off-by: John W. Linville --- net/rfkill/rfkill.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'net/rfkill') diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index 7a560b785097..022fe50ab0e0 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c @@ -252,7 +252,12 @@ EXPORT_SYMBOL_GPL(rfkill_epo); * a notification by the firmware/hardware of the current *real* * state of the radio rfkill switch. * - * It may not be called from an atomic context. + * Devices which are subject to external changes on their rfkill + * state (such as those caused by a hardware rfkill line) MUST + * have their driver arrange to call rfkill_force_state() as soon + * as possible after such a change. + * + * This function may not be called from an atomic context. */ int rfkill_force_state(struct rfkill *rfkill, enum rfkill_state state) { -- cgit v1.2.3