[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1337753512-10585-1-git-send-email-alex.hung@canonical.com>
Date: Wed, 23 May 2012 14:11:52 +0800
From: Alex Hung <alex.hung@...onical.com>
To: linville@...driver.com, johannes@...solutions.net,
davem@...emloft.net, linux-wireless@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
alex.hung@...onical.com
Subject: [PATCH] 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@...onical.com>
---
net/rfkill/core.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/net/rfkill/core.c b/net/rfkill/core.c
index 5be1957..84dd71a 100644
--- a/net/rfkill/core.c
+++ b/net/rfkill/core.c
@@ -324,7 +324,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);
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists