[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210715205920.2023980-9-mcgrof@kernel.org>
Date: Thu, 15 Jul 2021 13:59:16 -0700
From: Luis Chamberlain <mcgrof@...nel.org>
To: axboe@...nel.dk
Cc: hare@...e.de, bvanassche@....org, ming.lei@...hat.com,
hch@...radead.org, jack@...e.cz, osandov@...com,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
Luis Chamberlain <mcgrof@...nel.org>
Subject: [RFC 08/12] block/ataflop: use the blk_cleanup_disk() helper
Use the helper to replace two lines with one.
Signed-off-by: Luis Chamberlain <mcgrof@...nel.org>
---
drivers/block/ataflop.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/block/ataflop.c b/drivers/block/ataflop.c
index a093644ac39f..abb6fde0bd81 100644
--- a/drivers/block/ataflop.c
+++ b/drivers/block/ataflop.c
@@ -2076,8 +2076,7 @@ static int __init atari_floppy_init (void)
err:
while (--i >= 0) {
- blk_cleanup_queue(unit[i].disk[0]->queue);
- put_disk(unit[i].disk[0]);
+ blk_cleanup_disk(unit[i].disk[0]);
blk_mq_free_tag_set(&unit[i].tag_set);
}
@@ -2135,8 +2134,7 @@ static void __exit atari_floppy_exit(void)
if (!unit[i].disk[type])
continue;
del_gendisk(unit[i].disk[type]);
- blk_cleanup_queue(unit[i].disk[type]->queue);
- put_disk(unit[i].disk[type]);
+ blk_cleanup_disk(unit[i].disk[0]);
}
blk_mq_free_tag_set(&unit[i].tag_set);
}
--
2.27.0
Powered by blists - more mailing lists