n64: use sector SECTOR_SHIFT instead 512

Instead of using magic numbers use SECTOR_SHIFT to get the number of
sectors from the size.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Lauri Kasanen <cand@gmx.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
This commit is contained in:
Chaitanya Kulkarni 2021-01-25 15:32:39 -08:00 committed by Thomas Bogendoerfer
parent 2ce503b35d
commit 857f6fde1c

View File

@ -157,7 +157,7 @@ static int __init n64cart_probe(struct platform_device *pdev)
disk->fops = &n64cart_fops;
strcpy(disk->disk_name, "n64cart");
set_capacity(disk, size / 512);
set_capacity(disk, size >> SECTOR_SHIFT);
set_disk_ro(disk, 1);
blk_queue_flag_set(QUEUE_FLAG_NONROT, queue);