Commit 857f6fde authored by Chaitanya Kulkarni's avatar Chaitanya Kulkarni Committed by Thomas Bogendoerfer

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: default avatarChaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: default avatarLauri Kasanen <cand@gmx.com>
Signed-off-by: default avatarThomas Bogendoerfer <tsbogend@alpha.franken.de>
parent 2ce503b3
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment