From: Ed Lin Date: Tue, 5 Dec 2006 01:49:24 +0000 (-0800) Subject: [SCSI] stex: fix biosparam calculation X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b4b8bed12345bc03dfcef80cbbe78582429b063c;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [SCSI] stex: fix biosparam calculation Fix biosparam calculation. Signed-off-by: Ed Lin Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 185c270bb04..91d484c0dd9 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -1100,18 +1100,18 @@ static int stex_reset(struct scsi_cmnd *cmd) static int stex_biosparam(struct scsi_device *sdev, struct block_device *bdev, sector_t capacity, int geom[]) { - int heads = 255, sectors = 63, cylinders; + int heads = 255, sectors = 63; if (capacity < 0x200000) { heads = 64; sectors = 32; } - cylinders = sector_div(capacity, heads * sectors); + sector_div(capacity, heads * sectors); geom[0] = heads; geom[1] = sectors; - geom[2] = cylinders; + geom[2] = capacity; return 0; }