mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 13:58:46 +00:00
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:
parent
2ce503b35d
commit
857f6fde1c
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user