diff options
author | Jeff Garzik <jeff@garzik.org> | 2006-04-11 19:12:34 +0200 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2006-04-11 19:12:34 +0200 |
commit | 35bb94b116e1fd4959ef0d3187458b5820eac8c4 (patch) | |
tree | 48a05166c489838d04429279a2886ac6a32b20c9 /drivers/scsi/libata-scsi.c | |
parent | libata: Fix EH merge difference between this branch and upstream. (diff) | |
download | linux-35bb94b116e1fd4959ef0d3187458b5820eac8c4.tar.xz linux-35bb94b116e1fd4959ef0d3187458b5820eac8c4.zip |
libata: Add helper ata_shost_to_port()
Diffstat (limited to 'drivers/scsi/libata-scsi.c')
-rw-r--r-- | drivers/scsi/libata-scsi.c | 8 |
1 files changed, 4 insertions, 4 deletions
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) int ata_scsi_device_resume(struct scsi_device *sdev) { - struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; + struct ata_port *ap = ata_shost_to_port(sdev->host); struct ata_device *dev = &ap->device[sdev->id]; return ata_device_resume(ap, dev); @@ -403,7 +403,7 @@ int ata_scsi_device_resume(struct scsi_device *sdev) int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state) { - struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; + struct ata_port *ap = ata_shost_to_port(sdev->host); struct ata_device *dev = &ap->device[sdev->id]; return ata_device_suspend(ap, dev, state); @@ -704,7 +704,7 @@ int ata_scsi_slave_config(struct scsi_device *sdev) struct ata_port *ap; struct ata_device *dev; - ap = (struct ata_port *) &sdev->host->hostdata[0]; + ap = ata_shost_to_port(sdev->host); dev = &ap->device[sdev->id]; ata_scsi_dev_config(sdev, dev); @@ -2478,7 +2478,7 @@ int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) struct scsi_device *scsidev = cmd->device; struct Scsi_Host *shost = scsidev->host; - ap = (struct ata_port *) &shost->hostdata[0]; + ap = ata_shost_to_port(shost); spin_unlock(shost->host_lock); spin_lock(&ap->host_set->lock); |