ide-disk: use ata_id_wcache_enabled()

Replace open-coded check by ata_id_wcache_enabled()
(which also checks validity of word 85).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
Bartlomiej Zolnierkiewicz 2008-10-10 22:39:20 +02:00
parent dd8f46f64a
commit 8a089c6679
1 changed files with 1 additions and 1 deletions

View File

@ -889,7 +889,7 @@ static void idedisk_setup(ide_drive_t *drive)
drive->bios_cyl, drive->bios_head, drive->bios_sect);
/* write cache enabled? */
if ((id[ATA_ID_CSFO] & 1) || (id[ATA_ID_CFS_ENABLE_1] & (1 << 5)))
if ((id[ATA_ID_CSFO] & 1) || ata_id_wcache_enabled(id))
drive->wcache = 1;
write_cache(drive, 1);