aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/libata.h
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-04-11 13:12:34 -0400
committerJeff Garzik <jeff@garzik.org>2006-04-11 13:12:34 -0400
commit35bb94b116e1fd4959ef0d3187458b5820eac8c4 (patch)
tree48a05166c489838d04429279a2886ac6a32b20c9 /include/linux/libata.h
parent381544bba3ae6f2f1004b267da34f840b469033c (diff)
libata: Add helper ata_shost_to_port()
Diffstat (limited to 'include/linux/libata.h')
-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 2564bc514bca..fe0a1dcc76c2 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -33,6 +33,7 @@
33#include <asm/io.h> 33#include <asm/io.h>
34#include <linux/ata.h> 34#include <linux/ata.h>
35#include <linux/workqueue.h> 35#include <linux/workqueue.h>
36#include <scsi/scsi_host.h>
36 37
37/* 38/*
38 * compile-time options: to be removed as soon as all the drivers are 39 * 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)
977 dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma); 978 dma_free_coherent(dev, ATA_DMA_PAD_BUF_SZ, ap->pad, ap->pad_dma);
978} 979}
979 980
981static inline struct ata_port *ata_shost_to_port(struct Scsi_Host *host)
982{
983 return (struct ata_port *) &host->hostdata[0];
984}
985
980#endif /* __LINUX_LIBATA_H__ */ 986#endif /* __LINUX_LIBATA_H__ */