diff options
author | Tejun Heo <htejun@gmail.com> | 2006-03-01 01:25:38 +0900 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-03-03 15:39:54 -0500 |
commit | 597afd21401c85bdf9441830abf431c2be6fd45f (patch) | |
tree | bf03f9f0abc7a075fe15bf6404d7c6b90632ecaa /include/linux/libata.h | |
parent | 348edc59a8f9b9a66700781d972c24a46a79ae86 (diff) | |
download | lwn-597afd21401c85bdf9441830abf431c2be6fd45f.tar.gz lwn-597afd21401c85bdf9441830abf431c2be6fd45f.zip |
[PATCH] libata: seperate out ata_class_present()
Seperate out ata_class_present() from ata_dev_present(). This is
useful because new reset mechanism deals with classes[] directly.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'include/linux/libata.h')
-rw-r--r-- | include/linux/libata.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index 66b6847225df..22e86cb2d166 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -645,10 +645,14 @@ static inline unsigned int ata_tag_valid(unsigned int tag) return (tag < ATA_MAX_QUEUE) ? 1 : 0; } +static inline unsigned int ata_class_present(unsigned int class) +{ + return class == ATA_DEV_ATA || class == ATA_DEV_ATAPI; +} + static inline unsigned int ata_dev_present(const struct ata_device *dev) { - return ((dev->class == ATA_DEV_ATA) || - (dev->class == ATA_DEV_ATAPI)); + return ata_class_present(dev->class); } static inline u8 ata_chk_status(struct ata_port *ap) |