aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:19 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-10 16:39:19 -0400
commitdd8f46f64ae66659df3358fad73ed7699aa729dd (patch)
tree111159c455a79f5d4f54c9f5ce0790b475f6e37c /drivers/ide/ide-probe.c
parent48fb2688aa67baba373531cc4ed2d9e695983c3f (diff)
ide: use ata_id_current_chs_valid()
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>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c4
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];