projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2598a2b
)
floppy: use blk_cleanup_disk()
author
Luis Chamberlain
<mcgrof@kernel.org>
Mon, 27 Sep 2021 22:02:51 +0000
(15:02 -0700)
committer
Jens Axboe
<axboe@kernel.dk>
Mon, 18 Oct 2021 20:41:37 +0000
(14:41 -0600)
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>
drivers/block/floppy.c
patch
|
blob
|
history
diff --git
a/drivers/block/floppy.c
b/drivers/block/floppy.c
index 2ee4d3e7ea2d7639ae21d9898807aa2ddb56a881..74996728fc2417a83b87e604d26843d0e7409fcb 100644
(file)
--- 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);