summaryrefslogtreecommitdiff
path: root/drivers/block/n64cart.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-05-21 08:51:11 +0300
committerJens Axboe <axboe@kernel.dk>2021-06-01 16:42:24 +0300
commitf9dc931de80664eb78cbc8c85052bd0856d4aa9c (patch)
treed5bece450d79ca40ee4ea4e36f026163d2f39b72 /drivers/block/n64cart.c
parentb1833edc4c95d801b249159be361af6d3c3ea44d (diff)
downloadlinux-f9dc931de80664eb78cbc8c85052bd0856d4aa9c.tar.xz
n64cart: convert to blk_alloc_disk
Convert the n64cart driver to use the blk_alloc_disk helper to simplify gendisk and request_queue allocation. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org> Link: https://lore.kernel.org/r/20210521055116.1053587-22-hch@lst.de Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/n64cart.c')
-rw-r--r--drivers/block/n64cart.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/block/n64cart.c b/drivers/block/n64cart.c
index 3dae4b631dea..7b4dd10af9ec 100644
--- a/drivers/block/n64cart.c
+++ b/drivers/block/n64cart.c
@@ -132,14 +132,10 @@ static int __init n64cart_probe(struct platform_device *pdev)
if (!reg_base)
return -EINVAL;
- disk = alloc_disk(0);
+ disk = blk_alloc_disk(NUMA_NO_NODE);
if (!disk)
return -ENOMEM;
- disk->queue = blk_alloc_queue(NUMA_NO_NODE);
- if (!disk->queue)
- return -ENOMEM;
-
disk->first_minor = 0;
disk->flags = GENHD_FL_NO_PART_SCAN;
disk->fops = &n64cart_fops;