diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2021-09-27 15:02:51 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-18 14:41:37 -0600 |
commit | 3776339ae7acaf9590c668e86f45005fc9aff014 (patch) | |
tree | e1f205c89c6bc74d68aa5a40eb6e22093e9cd574 /drivers/block/floppy.c | |
parent | 2598a2bb357d64baaa94368133ddbc900b9eb246 (diff) |
floppy: use blk_cleanup_disk()
Use the blk_cleanup_queue() followed by put_disk() can be
replaced with blk_cleanup_disk(). No need for two separate
loops.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20210927220302.1073499-4-mcgrof@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/floppy.c')
-rw-r--r-- | drivers/block/floppy.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index 2ee4d3e7ea2d..74996728fc24 100644 --- a/drivers/block/floppy.c +++ b/drivers/block/floppy.c @@ -4951,13 +4951,9 @@ static void __exit floppy_module_exit(void) } for (i = 0; i < ARRAY_SIZE(floppy_type); i++) { if (disks[drive][i]) - blk_cleanup_queue(disks[drive][i]->queue); + blk_cleanup_disk(disks[drive][i]); } blk_mq_free_tag_set(&tag_sets[drive]); - for (i = 0; i < ARRAY_SIZE(floppy_type); i++) { - if (disks[drive][i]) - put_disk(disks[drive][i]); - } } cancel_delayed_work_sync(&fd_timeout); |