From: Bartlomiej Zolnierkiewicz Date: Fri, 10 Oct 2008 20:39:20 +0000 (+0200) Subject: ide-disk: use ata_id_wcache_enabled() X-Git-Tag: v2.6.28-rc1~710^2~63 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8a089c6679a9f1c0a00b7e08554e90b507ec527a;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c index 8f1ec037309..696658d504d 100644 --- a/drivers/ide/ide-disk.c +++ b/drivers/ide/ide-disk.c @@ -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);