diff options
author | Carlos Corbacho <carlos@strangeworlds.co.uk> | 2008-04-12 11:39:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-15 15:04:35 -0400 |
commit | 89796f64a20d31e74ee0051df2e26812c852e734 (patch) | |
tree | 5430ac55e047fa88c5cc11f1d1f1e8b95ceddf56 /net/rfkill | |
parent | cdbbe3d1f53086ece706674d3bf4f6d148083694 (diff) |
rfkill: Fix device type check when toggling states
rfkill_switch_all() is supposed to only switch all the interfaces of a
given type, but does not actually do this; instead, it just switches
everything currently in the same state.
Add the necessary type check in.
(This fixes a bug I've been seeing while developing an rfkill laptop
driver, with both bluetooth and wireless simultaneously changing state
after only pressing either KEY_WLAN or KEY_BLUETOOTH).
Signed-off-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/rfkill')
-rw-r--r-- | net/rfkill/rfkill.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index 140a0a8c6b02..4e10a95de832 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c | |||
@@ -92,7 +92,7 @@ void rfkill_switch_all(enum rfkill_type type, enum rfkill_state state) | |||
92 | rfkill_states[type] = state; | 92 | rfkill_states[type] = state; |
93 | 93 | ||
94 | list_for_each_entry(rfkill, &rfkill_list, node) { | 94 | list_for_each_entry(rfkill, &rfkill_list, node) { |
95 | if (!rfkill->user_claim) | 95 | if ((!rfkill->user_claim) && (rfkill->type == type)) |
96 | rfkill_toggle_radio(rfkill, state); | 96 | rfkill_toggle_radio(rfkill, state); |
97 | } | 97 | } |
98 | 98 | ||