Commit f9dc931d authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

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: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.de>
Reviewed-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/r/20210521055116.1053587-22-hch@lst.de


Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent b1833edc
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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;