diff options
author | Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com> | 2021-01-25 15:32:39 -0800 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2021-02-21 23:37:52 +0100 |
commit | 857f6fde1c6e800b685c2da864dabd7ff9091dca (patch) | |
tree | 469c88f8355391d606cffacbb64d02651c388537 /drivers/block | |
parent | 2ce503b35dcea29767c6d03b44e3c535809fdfcc (diff) |
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>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/n64cart.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/n64cart.c b/drivers/block/n64cart.c index 620f9e080d5d..c83a6af5a718 100644 --- a/drivers/block/n64cart.c +++ b/drivers/block/n64cart.c @@ -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); |