floppy: don't use PREPARE_[DELAYED_]WORK
authorTejun Heo <tj@kernel.org>
Fri, 7 Mar 2014 15:24:48 +0000 (10:24 -0500)
committerTejun Heo <tj@kernel.org>
Fri, 7 Mar 2014 15:24:48 +0000 (10:24 -0500)
commit75ddb38f0901d12831264cd74224598e4d8f528b
tree0881a11d77acbbb44b402975cdf6a8316a4f0136
parent4a8bb7f54860a3241b177bdeb06bb880151a23dc
floppy: don't use PREPARE_[DELAYED_]WORK

PREPARE_[DELAYED_]WORK() are being phased out.  They have few users
and a nasty surprise in terms of reentrancy guarantee as workqueue
considers work items to be different if they don't have the same work
function.

floppy has been multiplexing floppy_work and fd_timer with multiple
work functions.  Introduce floppy_work_workfn() and fd_timer_workfn()
which invoke floppy_work_fn and fd_timer_fn respectively and always
use the two functions as the work functions and update the users to
set floppy_work_fn and fd_timer_fn instead of overriding work
functions using PREPARE_[DELAYED_]WORK().

It would probably be best to route this with other related updates
through the workqueue tree.

Lightly tested using qemu.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Jiri Kosina <jkosina@suse.cz>
drivers/block/floppy.c