diff options
author | Eric Moore <eric.moore@lsi.com> | 2007-09-29 10:15:59 -0600 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.localdomain> | 2007-10-12 14:52:08 -0400 |
commit | e7eae9f6e94cd49261c2997b0b4f768c1351bc02 (patch) | |
tree | d82cd39d6d997fc650a0fae933ecaf7514e4e7de /drivers/message/fusion/mptsas.c | |
parent | cce99c6925b8d6a59cf584411277c1c20c330334 (diff) |
[SCSI] mpt fusion: add use of shost_priv and remove all the typecasting
The driver is currently typecasting to obtain the shost hostdata. The
driver is updated to use the shost_priv macro.
Signed-off-by: Eric Moore <Eric.Moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/message/fusion/mptsas.c')
-rw-r--r-- | drivers/message/fusion/mptsas.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c index d2f1b8ea93b..adbdbd45e0c 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c @@ -575,7 +575,7 @@ static void mptsas_target_reset_queue(MPT_ADAPTER *ioc, EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data) { - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; + MPT_SCSI_HOST *hd = shost_priv(ioc->sh); VirtTarget *vtarget = NULL; struct mptsas_target_reset_event *target_reset_list; u8 id, channel; @@ -622,7 +622,7 @@ mptsas_target_reset_queue(MPT_ADAPTER *ioc, static void mptsas_dev_reset_complete(MPT_ADAPTER *ioc) { - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; + MPT_SCSI_HOST *hd = shost_priv(ioc->sh); struct list_head *head = &hd->target_reset_list; struct mptsas_target_reset_event *target_reset_list; struct mptsas_hotplug_event *ev; @@ -739,7 +739,7 @@ mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) if (!ioc->sh || !ioc->sh->hostdata) goto out; - hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; + hd = shost_priv(ioc->sh); if (!hd->ioc) goto out; @@ -839,7 +839,7 @@ static int mptsas_target_alloc(struct scsi_target *starget) { struct Scsi_Host *host = dev_to_shost(&starget->dev); - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; + MPT_SCSI_HOST *hd = shost_priv(host); VirtTarget *vtarget; u8 id, channel; struct sas_rphy *rphy; @@ -908,7 +908,7 @@ static void mptsas_target_destroy(struct scsi_target *starget) { struct Scsi_Host *host = dev_to_shost(&starget->dev); - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; + MPT_SCSI_HOST *hd = shost_priv(host); struct sas_rphy *rphy; struct mptsas_portinfo *p; int i; @@ -941,7 +941,7 @@ static int mptsas_slave_alloc(struct scsi_device *sdev) { struct Scsi_Host *host = sdev->host; - MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; + MPT_SCSI_HOST *hd = shost_priv(host); struct sas_rphy *rphy; struct mptsas_portinfo *p; VirtDevice *vdevice; @@ -3215,7 +3215,7 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id) sh->sg_tablesize = numSGE; } - hd = (MPT_SCSI_HOST *) sh->hostdata; + hd = shost_priv(sh); hd->ioc = ioc; /* SCSI needs scsi_cmnd lookup table! |