Commit 88891ed3 authored by Linus Torvalds's avatar Linus Torvalds

Fix ATA 64-bit divides with CONFIG_LBD.

Use "sector_div()" to do the division, that's what it
exists for.
parent e241138a
...@@ -49,7 +49,8 @@ int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev, ...@@ -49,7 +49,8 @@ int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev,
{ {
geom[0] = 255; geom[0] = 255;
geom[1] = 63; geom[1] = 63;
geom[2] = capacity / (geom[0] * geom[1]); sector_div(capacity, 255*63);
geom[2] = capacity;
return 0; return 0;
} }
......
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