aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/libata-core.c4
-rw-r--r--drivers/scsi/libata-eh.c4
-rw-r--r--drivers/scsi/libata-scsi.c8
-rw-r--r--drivers/scsi/sata_svw.c2
4 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 3387fe35c54f..6420062f2c1e 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -4659,7 +4659,7 @@ static struct ata_port * ata_host_add(const struct ata_probe_ent *ent,
4659 4659
4660 host->transportt = &ata_scsi_transport_template; 4660 host->transportt = &ata_scsi_transport_template;
4661 4661
4662 ap = (struct ata_port *) &host->hostdata[0]; 4662 ap = ata_shost_to_port(host);
4663 4663
4664 ata_host_init(ap, host, host_set, ent, port_no); 4664 ata_host_init(ap, host, host_set, ent, port_no);
4665 4665
@@ -4872,7 +4872,7 @@ void ata_host_set_remove(struct ata_host_set *host_set)
4872 4872
4873int ata_scsi_release(struct Scsi_Host *host) 4873int ata_scsi_release(struct Scsi_Host *host)
4874{ 4874{
4875 struct ata_port *ap = (struct ata_port *) &host->hostdata[0]; 4875 struct ata_port *ap = ata_shost_to_port(host);
4876 int i; 4876 int i;
4877 4877
4878 DPRINTK("ENTER\n"); 4878 DPRINTK("ENTER\n");
diff --git a/drivers/scsi/libata-eh.c b/drivers/scsi/libata-eh.c
index b518654b9d60..c31b13fd5307 100644
--- a/drivers/scsi/libata-eh.c
+++ b/drivers/scsi/libata-eh.c
@@ -64,7 +64,7 @@
64enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd) 64enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd)
65{ 65{
66 struct Scsi_Host *host = cmd->device->host; 66 struct Scsi_Host *host = cmd->device->host;
67 struct ata_port *ap = (struct ata_port *) &host->hostdata[0]; 67 struct ata_port *ap = ata_shost_to_port(host);
68 unsigned long flags; 68 unsigned long flags;
69 struct ata_queued_cmd *qc; 69 struct ata_queued_cmd *qc;
70 enum scsi_eh_timer_return ret = EH_HANDLED; 70 enum scsi_eh_timer_return ret = EH_HANDLED;
@@ -99,7 +99,7 @@ enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd)
99 */ 99 */
100void ata_scsi_error(struct Scsi_Host *host) 100void ata_scsi_error(struct Scsi_Host *host)
101{ 101{
102 struct ata_port *ap = (struct ata_port *)&host->hostdata[0]; 102 struct ata_port *ap = ata_shost_to_port(host);
103 103
104 DPRINTK("ENTER\n"); 104 DPRINTK("ENTER\n");
105 105
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 5ae7613bc157..9871f8272df0 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -395,7 +395,7 @@ void ata_dump_status(unsigned id, struct ata_taskfile *tf)
395 395
396int ata_scsi_device_resume(struct scsi_device *sdev) 396int ata_scsi_device_resume(struct scsi_device *sdev)
397{ 397{
398 struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; 398 struct ata_port *ap = ata_shost_to_port(sdev->host);
399 struct ata_device *dev = &ap->device[sdev->id]; 399 struct ata_device *dev = &ap->device[sdev->id];
400 400
401 return ata_device_resume(ap, dev); 401 return ata_device_resume(ap, dev);
@@ -403,7 +403,7 @@ int ata_scsi_device_resume(struct scsi_device *sdev)
403 403
404int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state) 404int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state)
405{ 405{
406 struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; 406 struct ata_port *ap = ata_shost_to_port(sdev->host);
407 struct ata_device *dev = &ap->device[sdev->id]; 407 struct ata_device *dev = &ap->device[sdev->id];
408 408
409 return ata_device_suspend(ap, dev, state); 409 return ata_device_suspend(ap, dev, state);
@@ -704,7 +704,7 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
704 struct ata_port *ap; 704 struct ata_port *ap;
705 struct ata_device *dev; 705 struct ata_device *dev;
706 706
707 ap = (struct ata_port *) &sdev->host->hostdata[0]; 707 ap = ata_shost_to_port(sdev->host);
708 dev = &ap->device[sdev->id]; 708 dev = &ap->device[sdev->id];
709 709
710 ata_scsi_dev_config(sdev, dev); 710 ata_scsi_dev_config(sdev, dev);
@@ -2478,7 +2478,7 @@ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
2478 struct scsi_device *scsidev = cmd->device; 2478 struct scsi_device *scsidev = cmd->device;
2479 struct Scsi_Host *shost = scsidev->host; 2479 struct Scsi_Host *shost = scsidev->host;
2480 2480
2481 ap = (struct ata_port *) &shost->hostdata[0]; 2481 ap = ata_shost_to_port(shost);
2482 2482
2483 spin_unlock(shost->host_lock); 2483 spin_unlock(shost->host_lock);
2484 spin_lock(&ap->host_set->lock); 2484 spin_lock(&ap->host_set->lock);
diff --git a/drivers/scsi/sata_svw.c b/drivers/scsi/sata_svw.c
index e15c693e0539..d5eb5375e265 100644
--- a/drivers/scsi/sata_svw.c
+++ b/drivers/scsi/sata_svw.c
@@ -257,7 +257,7 @@ static int k2_sata_proc_info(struct Scsi_Host *shost, char *page, char **start,
257 int len, index; 257 int len, index;
258 258
259 /* Find the ata_port */ 259 /* Find the ata_port */
260 ap = (struct ata_port *) &shost->hostdata[0]; 260 ap = ata_shost_to_port(shost);
261 if (ap == NULL) 261 if (ap == NULL)
262 return 0; 262 return 0;
263 263