Commit 27e49ca9 authored by Alex Hung's avatar Alex Hung Committed by John W. Linville

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: default avatarAlex Hung <alex.hung@canonical.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent e8c9bd5b
...@@ -325,7 +325,7 @@ static void __rfkill_switch_all(const enum rfkill_type type, bool blocked) ...@@ -325,7 +325,7 @@ static void __rfkill_switch_all(const enum rfkill_type type, bool blocked)
rfkill_global_states[type].cur = blocked; rfkill_global_states[type].cur = blocked;
list_for_each_entry(rfkill, &rfkill_list, node) { list_for_each_entry(rfkill, &rfkill_list, node) {
if (rfkill->type != type) if (rfkill->type != type && type != RFKILL_TYPE_ALL)
continue; continue;
rfkill_set_block(rfkill, blocked); rfkill_set_block(rfkill, blocked);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment