aboutsummaryrefslogtreecommitdiff
path: root/net/rfkill/core.c
diff options
context:
space:
mode:
authorAlex Hung <alex.hung@canonical.com>2012-05-23 14:11:52 +0800
committerJohn W. Linville <linville@tuxdriver.com>2012-06-06 15:18:17 -0400
commit27e49ca95570c4685a32be9d4664f2b0b6d89368 (patch)
tree918a62cf0d9a03334bc93e23b6a2a627fd32d052 /net/rfkill/core.c
parente8c9bd5b8d807cfe6c923265969a523b1ba1e6c2 (diff)
rfkill: Add the capability to switch all devices of all type in __rfkill_switch_all().
__rfkill_switch_all() switches the state of devices of a given type; however, it does not switch devices of all type (RFKILL_TYPE_ALL). As a result, it ignores the keycode "KEY_RFKILL" from another module, i.e. eeepc-wmi. This fix is to make __rfkill_switch_all() to be able to switch not only devices of a given type but also all devices. Signed-off-by: Alex Hung <alex.hung@canonical.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/rfkill/core.c')
-rw-r--r--net/rfkill/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index f974961754c..752b72360eb 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -325,7 +325,7 @@ static void __rfkill_switch_all(const enum rfkill_type type, bool blocked)
rfkill_global_states[type].cur = blocked;
list_for_each_entry(rfkill, &rfkill_list, node) {
- if (rfkill->type != type)
+ if (rfkill->type != type && type != RFKILL_TYPE_ALL)
continue;
rfkill_set_block(rfkill, blocked);