diff options
-rw-r--r-- | drivers/ide/ide-probe.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index 1bb4b2c0e2f4..2f105f4bbdec 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -69,9 +69,7 @@ static void ide_disk_init_chs(ide_drive_t *drive) | |||
69 | } | 69 | } |
70 | 70 | ||
71 | /* Handle logical geometry translation by the drive */ | 71 | /* Handle logical geometry translation by the drive */ |
72 | if ((id[ATA_ID_FIELD_VALID] & 1) && id[ATA_ID_CUR_CYLS] && | 72 | if (ata_id_current_chs_valid(id)) { |
73 | id[ATA_ID_CUR_HEADS] && id[ATA_ID_CUR_HEADS] <= 16 && | ||
74 | id[ATA_ID_CUR_SECTORS]) { | ||
75 | drive->cyl = id[ATA_ID_CUR_CYLS]; | 73 | drive->cyl = id[ATA_ID_CUR_CYLS]; |
76 | drive->head = id[ATA_ID_CUR_HEADS]; | 74 | drive->head = id[ATA_ID_CUR_HEADS]; |
77 | drive->sect = id[ATA_ID_CUR_SECTORS]; | 75 | drive->sect = id[ATA_ID_CUR_SECTORS]; |