rfkill: mutex fixes
commit22fad9d1fba7c0ab148e01d9c31e5ebb77b16935
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 19 Oct 2008 20:58:36 +0000 (19 18:58 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sun, 19 Oct 2008 20:58:36 +0000 (19 18:58 -0200)
treec1429f335ea51e08141b541543987e7a07db1c5b
parent7d1628b9ce62bf604e0c0a1483bb7db5e4bfe997
rfkill: mutex fixes

There are two mutexes in rfkill:

rfkill->mutex, which protects some of the fields of a rfkill struct, and is
also used for callback serialization.

rfkill_mutex, which protects the global state, the list of registered
rfkill structs and rfkill->claim.

Make sure to use the correct mutex, and to not miss locking rfkill->mutex
even when we already took rfkill_mutex.

Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Ivo van Doorn <IvDoorn@gmail.com>
net/rfkill/rfkill.c