aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/libata.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 2564bc514bc..fe0a1dcc76c 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -33,6 +33,7 @@
#include <asm/io.h>
#include <linux/ata.h>
#include <linux/workqueue.h>
+#include <scsi/scsi_host.h>
/*
* compile-time options: to be removed as soon as all the drivers are
@@ -977,4 +978,9 @@ static inline void ata_pad_free(struct ata_port *ap, struct device *dev)
dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma);
}
+static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
+{
+ return (struct ata_port *) &host->hostdata[0];
+}
+
#endif /* __LINUX_LIBATA_H__ */