mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 22:21:21 +00:00
libata: Add helper ata_shost_to_port()
This commit is contained in:
parent
381544bba3
commit
35bb94b116
5 changed files with 15 additions and 9 deletions
|
@ -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__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue