From 043ea303862df141a74b873cd5fd4f16efd2a64c Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sun, 16 May 2004 17:41:56 -0400 Subject: [libata] replace ATA_QCFLAG_ATAPI with inline helper Detection of an ATAPI taskfile is possible using a simple test on existing information, so there is no need to cache this value in a separate flag (ATA_QCFLAG_ATAPI). Instead, create and use a new helper function is_atapi_taskfile(). --- include/linux/ata.h | 6 ++++++ include/linux/libata.h | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/ata.h b/include/linux/ata.h index 919509f32327..38ccb84c039e 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -218,4 +218,10 @@ struct ata_taskfile { ((u64) dev->id[(n) + 1] << 16) | \ ((u64) dev->id[(n) + 0]) ) +static inline int is_atapi_taskfile(struct ata_taskfile *tf) +{ + return (tf->protocol == ATA_PROT_ATAPI) || + (tf->protocol == ATA_PROT_ATAPI_DMA); +} + #endif /* __LINUX_ATA_H__ */ diff --git a/include/linux/libata.h b/include/linux/libata.h index 388d149cf202..18c90a0c1cfd 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -111,7 +111,6 @@ enum { ATA_QCFLAG_ACTIVE = (1 << 1), /* cmd not yet ack'd to scsi lyer */ ATA_QCFLAG_DMA = (1 << 2), /* data delivered via DMA */ - ATA_QCFLAG_ATAPI = (1 << 3), /* is ATAPI packet command? */ ATA_QCFLAG_SG = (1 << 4), /* have s/g table? */ /* various lengths of time */ -- cgit v1.2.3