Skip to content

Commit

Permalink
ide: use ata_id_current_chs_valid()
Browse files Browse the repository at this point in the history
Replace open-coded checks by ata_id_current_chs_valid().

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 10, 2008
1 parent 48fb268 commit dd8f46f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/ide/ide-probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@ static void ide_disk_init_chs(ide_drive_t *drive)
}

/* Handle logical geometry translation by the drive */
if ((id[ATA_ID_FIELD_VALID] & 1) && id[ATA_ID_CUR_CYLS] &&
id[ATA_ID_CUR_HEADS] && id[ATA_ID_CUR_HEADS] <= 16 &&
id[ATA_ID_CUR_SECTORS]) {
if (ata_id_current_chs_valid(id)) {
drive->cyl = id[ATA_ID_CUR_CYLS];
drive->head = id[ATA_ID_CUR_HEADS];
drive->sect = id[ATA_ID_CUR_SECTORS];
Expand Down

0 comments on commit dd8f46f

Please sign in to comment.