aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-sff.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2011-12-02 10:39:53 -0500
committerJeff Garzik <jgarzik@redhat.com>2012-01-08 19:14:58 -0500
commit002ae08448e241ea8e304008f9cb4bc836f9ff16 (patch)
treed8866d61714ffc7f20604c4b113955e2ccbb47ca /drivers/ata/libata-sff.c
parent9ee4f3933930abf5cc34f8e9d69fe0e08c18f602 (diff)
libata-sff: use ATAPI_{COD|IO}
atapi_pio_bytes() uses bare numbers for the ATAPI interrupt reason bits despite these are #define'd in <linux/ata.h>. Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/libata-sff.c')
-rw-r--r--drivers/ata/libata-sff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c
index 4cadfa28f940..9691dd0966d7 100644
--- a/drivers/ata/libata-sff.c
+++ b/drivers/ata/libata-sff.c
@@ -929,11 +929,11 @@ static void atapi_pio_bytes(struct ata_queued_cmd *qc)
929 bytes = (bc_hi << 8) | bc_lo; 929 bytes = (bc_hi << 8) | bc_lo;
930 930
931 /* shall be cleared to zero, indicating xfer of data */ 931 /* shall be cleared to zero, indicating xfer of data */
932 if (unlikely(ireason & (1 << 0))) 932 if (unlikely(ireason & ATAPI_COD))
933 goto atapi_check; 933 goto atapi_check;
934 934
935 /* make sure transfer direction matches expected */ 935 /* make sure transfer direction matches expected */
936 i_write = ((ireason & (1 << 1)) == 0) ? 1 : 0; 936 i_write = ((ireason & ATAPI_IO) == 0) ? 1 : 0;
937 if (unlikely(do_write != i_write)) 937 if (unlikely(do_write != i_write))
938 goto atapi_check; 938 goto atapi_check;
939 939