diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2021-09-27 15:02:55 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2021-10-18 14:41:37 -0600 |
commit | b76a30c254d987b4ae7d47415081121d4c0a7423 (patch) | |
tree | 63c66ff05a413808ac50a69bcad5c3a7fa3fecfe | |
parent | a2379420c7d7cb14a8b214fc7c0e2f55f66393ac (diff) | |
download | linux-b76a30c254d987b4ae7d47415081121d4c0a7423.tar.gz linux-b76a30c254d987b4ae7d47415081121d4c0a7423.tar.bz2 linux-b76a30c254d987b4ae7d47415081121d4c0a7423.zip |
swim: simplify using blk_cleanup_disk() on swim_remove()
We can simplify swim_remove() by using one call instead of two,
just as other drivers do. Use that pattern.
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20210927220302.1073499-8-mcgrof@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | drivers/block/swim.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/block/swim.c b/drivers/block/swim.c index 3911d0833e1b..868d59476065 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -912,9 +912,8 @@ static int swim_remove(struct platform_device *dev) for (drive = 0; drive < swd->floppy_count; drive++) { del_gendisk(swd->unit[drive].disk); - blk_cleanup_queue(swd->unit[drive].disk->queue); + blk_cleanup_disk(swd->unit[drive].disk); blk_mq_free_tag_set(&swd->unit[drive].tag_set); - put_disk(swd->unit[drive].disk); } unregister_blkdev(FLOPPY_MAJOR, "fd"); |