]> git.baikalelectronics.ru Git - kernel.git/commit
p54spi: Fix workqueue deadlock
authorMichael Büsch <m@bues.ch>
Wed, 16 Nov 2011 22:55:46 +0000 (23:55 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 17 Nov 2011 19:40:37 +0000 (14:40 -0500)
commitf0eaa9ff58e357f2125295af16dbff35aa7c7f6d
treed9620c49810aa36cf993d2390a24ab42f0d73700
parent19f2f5959d97649917bac59b305114ea9b6ba63e
p54spi: Fix workqueue deadlock

priv->work must not be synced while priv->mutex is locked, because
the mutex is taken in the work handler.
Move cancel_work_sync down to after the device shutdown code.
This is safe, because the work handler checks fw_state and bails out
early in case of a race.

Signed-off-by: Michael Buesch <m@bues.ch>
Cc: <stable@vger.kernel.org>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/p54/p54spi.c