Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1b678347121001c3c230c6eccfdf9f65c3ec1a4e
Commit:     1b678347121001c3c230c6eccfdf9f65c3ec1a4e
Parent:     d85714d81cc0408daddb68c10f7fd69eafe7c213
Author:     Benjamin Herrenschmidt <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 19 00:30:05 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
CommitDate: Fri Oct 19 00:30:05 2007 +0200

    ide: Add ide_get_paired_drive() helper
    
    This adds a helper to get to the "other" drive on a pair connected
    to a given hwif.
    
    Signed-off-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Cc: Andrew Morton <[EMAIL PROTECTED]>
    Acked-by: Sergei Shtylyov <[EMAIL PROTECTED]>
    Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
 include/linux/ide.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/include/linux/ide.h b/include/linux/ide.h
index e39ee2f..69dbe7d 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1454,4 +1454,11 @@ static inline int hwif_to_node(ide_hwif_t *hwif)
        return dev ? pcibus_to_node(dev->bus) : -1;
 }
 
+static inline ide_drive_t *ide_get_paired_drive(ide_drive_t *drive)
+{
+       ide_hwif_t *hwif        = HWIF(drive);
+
+       return &hwif->drives[(drive->dn ^ 1) & 1];
+}
+
 #endif /* _IDE_H */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to