mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-24 01:41:39 +00:00
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>
This commit is contained in:
parent
48fb2688aa
commit
dd8f46f64a
1 changed files with 1 additions and 3 deletions
|
@ -69,9 +69,7 @@ static void ide_disk_init_chs(ide_drive_t *drive)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Handle logical geometry translation by the drive */
|
/* Handle logical geometry translation by the drive */
|
||||||
if ((id[ATA_ID_FIELD_VALID] & 1) && id[ATA_ID_CUR_CYLS] &&
|
if (ata_id_current_chs_valid(id)) {
|
||||||
id[ATA_ID_CUR_HEADS] && id[ATA_ID_CUR_HEADS] <= 16 &&
|
|
||||||
id[ATA_ID_CUR_SECTORS]) {
|
|
||||||
drive->cyl = id[ATA_ID_CUR_CYLS];
|
drive->cyl = id[ATA_ID_CUR_CYLS];
|
||||||
drive->head = id[ATA_ID_CUR_HEADS];
|
drive->head = id[ATA_ID_CUR_HEADS];
|
||||||
drive->sect = id[ATA_ID_CUR_SECTORS];
|
drive->sect = id[ATA_ID_CUR_SECTORS];
|
||||||
|
|
Loading…
Reference in a new issue