libata: Add helper ata_shost_to_port()
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 3387fe35..6420062 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -4659,7 +4659,7 @@
host->transportt = &ata_scsi_transport_template;
- ap = (struct ata_port *) &host->hostdata[0];
+ ap = ata_shost_to_port(host);
ata_host_init(ap, host, host_set, ent, port_no);
@@ -4872,7 +4872,7 @@
int ata_scsi_release(struct Scsi_Host *host)
{
- struct ata_port *ap = (struct ata_port *) &host->hostdata[0];
+ struct ata_port *ap = ata_shost_to_port(host);
int i;
DPRINTK("ENTER\n");