rfkill: mutex fixes
commited921a6b3e6812f7b9a7b4694d2cf27126209af9
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 11 Nov 2008 01:46:25 +0000 (10 23:46 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Tue, 11 Nov 2008 01:46:25 +0000 (10 23:46 -0200)
treec10e9cd7ef865f3e4d4cd1cd42e3ae6f3c10298f
parent20b8407e53f65be15f211a22046523878a57dbb9
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