aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2009-03-31 20:15:29 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 20:15:29 +0200
commit47ab834854d4639fedf2ed2f21b41297f2abe1a7 (patch)
tree3e92a2d90afeead67572fe973d1d1eeed48cf6c1 /drivers/ide
parent74638c84821c066d02c158bc843c84499ddc9764 (diff)
downloadkernel_goldelico_gta04-47ab834854d4639fedf2ed2f21b41297f2abe1a7.zip
kernel_goldelico_gta04-47ab834854d4639fedf2ed2f21b41297f2abe1a7.tar.gz
kernel_goldelico_gta04-47ab834854d4639fedf2ed2f21b41297f2abe1a7.tar.bz2
ide-disk: use ATA_ERR
Make use of ATA_ERR instead of hard-coded value in idedisk_set_max_address() and idedisk_read_native_max_address(). Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/ide-disk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide-disk.c b/drivers/ide/ide-disk.c
index ca934c8..c998cf8 100644
--- a/drivers/ide/ide-disk.c
+++ b/drivers/ide/ide-disk.c
@@ -227,7 +227,7 @@ static u64 idedisk_read_native_max_address(ide_drive_t *drive, int lba48)
ide_no_data_taskfile(drive, &cmd);
/* if OK, compute maximum address value */
- if ((tf->status & 0x01) == 0)
+ if (!(tf->status & ATA_ERR))
addr = ide_get_lba_addr(tf, lba48) + 1;
return addr;
@@ -267,7 +267,7 @@ static u64 idedisk_set_max_address(ide_drive_t *drive, u64 addr_req, int lba48)
ide_no_data_taskfile(drive, &cmd);
/* if OK, compute maximum address value */
- if ((tf->status & 0x01) == 0)
+ if (!(tf->status & ATA_ERR))
addr_set = ide_get_lba_addr(tf, lba48) + 1;
return addr_set;