summaryrefslogtreecommitdiff
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-02-28 16:25:38 (GMT)
committerJeff Garzik <jeff@garzik.org>2006-03-03 20:39:54 (GMT)
commit597afd21401c85bdf9441830abf431c2be6fd45f (patch)
treebf03f9f0abc7a075fe15bf6404d7c6b90632ecaa /include/linux/libata.h
parent348edc59a8f9b9a66700781d972c24a46a79ae86 (diff)
downloadlinux-fsl-qoriq-597afd21401c85bdf9441830abf431c2be6fd45f.tar.xz
[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.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 66b6847..22e86cb 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)