diff options
author | Tejun Heo <htejun@gmail.com> | 2006-04-02 04:54:46 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-02 10:02:57 -0400 |
commit | 002c8054fa8d0f1afce2b0c728be32d338b9293a (patch) | |
tree | 3ca1bddacad6bb08b8f9b27ef6ebfbdb4cee4d46 /include/linux/libata.h | |
parent | 852ee16a914fb3ada2f81e222677c04defc2f15f (diff) |
[PATCH] libata: implement ata_dev_absent()
For the time being we cannot use ata_dev_present() as it was renamed
to ata_dev_enabled() but we still need presence test. Implement
negation of the test. Conveniently, the negated result is needed in
more places. This is suggested by Jeff Garzik.
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 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h index c6883ba8cba9..0f8e3720edd9 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -682,6 +682,11 @@ static inline unsigned int ata_class_disabled(unsigned int class) | |||
682 | return class == ATA_DEV_ATA_UNSUP || class == ATA_DEV_ATAPI_UNSUP; | 682 | return class == ATA_DEV_ATA_UNSUP || class == ATA_DEV_ATAPI_UNSUP; |
683 | } | 683 | } |
684 | 684 | ||
685 | static inline unsigned int ata_class_absent(unsigned int class) | ||
686 | { | ||
687 | return !ata_class_enabled(class) && !ata_class_disabled(class); | ||
688 | } | ||
689 | |||
685 | static inline unsigned int ata_dev_enabled(const struct ata_device *dev) | 690 | static inline unsigned int ata_dev_enabled(const struct ata_device *dev) |
686 | { | 691 | { |
687 | return ata_class_enabled(dev->class); | 692 | return ata_class_enabled(dev->class); |
@@ -692,6 +697,11 @@ static inline unsigned int ata_dev_disabled(const struct ata_device *dev) | |||
692 | return ata_class_disabled(dev->class); | 697 | return ata_class_disabled(dev->class); |
693 | } | 698 | } |
694 | 699 | ||
700 | static inline unsigned int ata_dev_absent(const struct ata_device *dev) | ||
701 | { | ||
702 | return ata_class_absent(dev->class); | ||
703 | } | ||
704 | |||
695 | static inline u8 ata_chk_status(struct ata_port *ap) | 705 | static inline u8 ata_chk_status(struct ata_port *ap) |
696 | { | 706 | { |
697 | return ap->ops->check_status(ap); | 707 | return ap->ops->check_status(ap); |