Skip to content

Commit

Permalink
ide-disk: use ata_id_wcache_enabled()
Browse files Browse the repository at this point in the history
Replace open-coded check by ata_id_wcache_enabled()
(which also checks validity of word 85).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 10, 2008
1 parent dd8f46f commit 8a089c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/ide/ide-disk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8a089c6

Please sign in to comment.