p54spi: Fix workqueue deadlock
commit160b68b38d29c8ab41eeb8187b2d724bf69c6756
authorMichael Büsch <m@bues.ch>
Wed, 16 Nov 2011 22:55:46 +0000 (16 23:55 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 9 Dec 2011 16:54:26 +0000 (9 08:54 -0800)
tree2a5b69b7947993db4f3543c65fddcb34d989c394
parent3dcc2d249f99606863f00635e2becf95a389dc9c
p54spi: Fix workqueue deadlock

commit 2d1618170eb493d18f66f2ac03775409a6fb97c6 upstream.

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>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/wireless/p54/p54spi.c