diff options
author | Tejun Heo <tj@kernel.org> | 2010-12-24 10:00:18 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2010-12-24 10:00:18 -0500 |
commit | 6dca467a76bb0ed71d65143b235e0ef80e44436f (patch) | |
tree | b74b8643fd8a2e20268a96584257b27ed9d1a999 /drivers | |
parent | 9db8995be5e1869b5effa117909bc285e06fc09b (diff) |
s390: don't use flush_scheduled_work()
flush_scheduled_work() is deprecated and scheduled to be removed.
* tape_3590: Create and use tape_3590_wq instead of the system_wq.
* tape_block: Directly flush requeue_task on cleanup instead of using
flush_scheduled_work().
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux390@de.ibm.com
Cc: linux-s390@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/s390/char/tape_3590.c | 18 | ||||
-rw-r--r-- | drivers/s390/char/tape_block.c | 2 |
2 files changed, 14 insertions, 6 deletions
diff --git a/drivers/s390/char/tape_3590.c b/drivers/s390/char/tape_3590.c index deff2c3361e4..fbe361fcd2c0 100644 --- a/drivers/s390/char/tape_3590.c +++ b/drivers/s390/char/tape_3590.c | |||
@@ -24,6 +24,8 @@ | |||
24 | #include "tape_std.h" | 24 | #include "tape_std.h" |
25 | #include "tape_3590.h" | 25 | #include "tape_3590.h" |
26 | 26 | ||
27 | static struct workqueue_struct *tape_3590_wq; | ||
28 | |||
27 | /* | 29 | /* |
28 | * Pointer to debug area. | 30 | * Pointer to debug area. |
29 | */ | 31 | */ |
@@ -613,7 +615,7 @@ tape_3590_schedule_work(struct tape_device *device, enum tape_op op) | |||
613 | p->device = tape_get_device(device); | 615 | p->device = tape_get_device(device); |
614 | p->op = op; | 616 | p->op = op; |
615 | 617 | ||
616 | schedule_work(&p->work); | 618 | queue_work(tape_3590_wq, &p->work); |
617 | return 0; | 619 | return 0; |
618 | } | 620 | } |
619 | 621 | ||
@@ -1629,7 +1631,7 @@ fail_kmalloc: | |||
1629 | static void | 1631 | static void |
1630 | tape_3590_cleanup_device(struct tape_device *device) | 1632 | tape_3590_cleanup_device(struct tape_device *device) |
1631 | { | 1633 | { |
1632 | flush_scheduled_work(); | 1634 | flush_workqueue(tape_3590_wq); |
1633 | tape_std_unassign(device); | 1635 | tape_std_unassign(device); |
1634 | 1636 | ||
1635 | kfree(device->discdata); | 1637 | kfree(device->discdata); |
@@ -1733,11 +1735,17 @@ tape_3590_init(void) | |||
1733 | #endif | 1735 | #endif |
1734 | 1736 | ||
1735 | DBF_EVENT(3, "3590 init\n"); | 1737 | DBF_EVENT(3, "3590 init\n"); |
1738 | |||
1739 | tape_3590_wq = alloc_workqueue("tape_3590", 0, 0); | ||
1740 | if (!tape_3590_wq) | ||
1741 | return -ENOMEM; | ||
1742 | |||
1736 | /* Register driver for 3590 tapes. */ | 1743 | /* Register driver for 3590 tapes. */ |
1737 | rc = ccw_driver_register(&tape_3590_driver); | 1744 | rc = ccw_driver_register(&tape_3590_driver); |
1738 | if (rc) | 1745 | if (rc) { |
1746 | destroy_workqueue(tape_3590_wq); | ||
1739 | DBF_EVENT(3, "3590 init failed\n"); | 1747 | DBF_EVENT(3, "3590 init failed\n"); |
1740 | else | 1748 | } else |
1741 | DBF_EVENT(3, "3590 registered\n"); | 1749 | DBF_EVENT(3, "3590 registered\n"); |
1742 | return rc; | 1750 | return rc; |
1743 | } | 1751 | } |
@@ -1746,7 +1754,7 @@ static void | |||
1746 | tape_3590_exit(void) | 1754 | tape_3590_exit(void) |
1747 | { | 1755 | { |
1748 | ccw_driver_unregister(&tape_3590_driver); | 1756 | ccw_driver_unregister(&tape_3590_driver); |
1749 | 1757 | destroy_workqueue(tape_3590_wq); | |
1750 | debug_unregister(TAPE_DBF_AREA); | 1758 | debug_unregister(TAPE_DBF_AREA); |
1751 | } | 1759 | } |
1752 | 1760 | ||
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c index f0fa9ca5cb2c..55d2d0f4eabc 100644 --- a/drivers/s390/char/tape_block.c +++ b/drivers/s390/char/tape_block.c | |||
@@ -264,7 +264,7 @@ cleanup_queue: | |||
264 | void | 264 | void |
265 | tapeblock_cleanup_device(struct tape_device *device) | 265 | tapeblock_cleanup_device(struct tape_device *device) |
266 | { | 266 | { |
267 | flush_scheduled_work(); | 267 | flush_work_sync(&device->blk_data.requeue_task); |
268 | tape_put_device(device); | 268 | tape_put_device(device); |
269 | 269 | ||
270 | if (!device->blk_data.disk) { | 270 | if (!device->blk_data.disk) { |