rfkill: Fix device type check when toggling states
commit5b94b671f5c9f2e1d98b14510032ad34f434265d
authorCarlos Corbacho <carlos@strangeworlds.co.uk>
Sat, 31 May 2008 17:41:11 +0000 (31 14:41 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 31 May 2008 17:41:11 +0000 (31 14:41 -0300)
tree5161644907cdd277e3608795ed108483fc9757c0
parent23e4c1d161e37d7a31cff0d5151384478d7ab40e
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>
net/rfkill/rfkill.c