diff options
| author | Jeff Garzik <jgarzik@redhat.com> | 2004-05-16 17:41:56 -0400 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@redhat.com> | 2004-05-16 17:41:56 -0400 |
| commit | 043ea303862df141a74b873cd5fd4f16efd2a64c (patch) | |
| tree | 7f5d9849ca73de32e296e5b5589c64674d8d710c /include/linux/ata.h | |
| parent | ffb17d43e7e39a0a323a261bae0124012ae83709 (diff) | |
[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().
Diffstat (limited to 'include/linux/ata.h')
| -rw-r--r-- | include/linux/ata.h | 6 |
1 files changed, 6 insertions, 0 deletions
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__ */ |
