diff options
author | Eric Moore <eric.moore@lsi.com> | 2007-09-29 12:15:59 -0400 |
---|---|---|
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 d2f1b8ea93b2..adbdbd45e0c9 100644 --- a/drivers/message/fusion/mptsas.c +++ b/drivers/message/fusion/mptsas.c | |||
@@ -575,7 +575,7 @@ static void | |||
575 | mptsas_target_reset_queue(MPT_ADAPTER *ioc, | 575 | mptsas_target_reset_queue(MPT_ADAPTER *ioc, |
576 | EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data) | 576 | EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data) |
577 | { | 577 | { |
578 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; | 578 | MPT_SCSI_HOST *hd = shost_priv(ioc->sh); |
579 | VirtTarget *vtarget = NULL; | 579 | VirtTarget *vtarget = NULL; |
580 | struct mptsas_target_reset_event *target_reset_list; | 580 | struct mptsas_target_reset_event *target_reset_list; |
581 | u8 id, channel; | 581 | u8 id, channel; |
@@ -622,7 +622,7 @@ mptsas_target_reset_queue(MPT_ADAPTER *ioc, | |||
622 | static void | 622 | static void |
623 | mptsas_dev_reset_complete(MPT_ADAPTER *ioc) | 623 | mptsas_dev_reset_complete(MPT_ADAPTER *ioc) |
624 | { | 624 | { |
625 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; | 625 | MPT_SCSI_HOST *hd = shost_priv(ioc->sh); |
626 | struct list_head *head = &hd->target_reset_list; | 626 | struct list_head *head = &hd->target_reset_list; |
627 | struct mptsas_target_reset_event *target_reset_list; | 627 | struct mptsas_target_reset_event *target_reset_list; |
628 | struct mptsas_hotplug_event *ev; | 628 | struct mptsas_hotplug_event *ev; |
@@ -739,7 +739,7 @@ mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase) | |||
739 | 739 | ||
740 | if (!ioc->sh || !ioc->sh->hostdata) | 740 | if (!ioc->sh || !ioc->sh->hostdata) |
741 | goto out; | 741 | goto out; |
742 | hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; | 742 | hd = shost_priv(ioc->sh); |
743 | if (!hd->ioc) | 743 | if (!hd->ioc) |
744 | goto out; | 744 | goto out; |
745 | 745 | ||
@@ -839,7 +839,7 @@ static int | |||
839 | mptsas_target_alloc(struct scsi_target *starget) | 839 | mptsas_target_alloc(struct scsi_target *starget) |
840 | { | 840 | { |
841 | struct Scsi_Host *host = dev_to_shost(&starget->dev); | 841 | struct Scsi_Host *host = dev_to_shost(&starget->dev); |
842 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 842 | MPT_SCSI_HOST *hd = shost_priv(host); |
843 | VirtTarget *vtarget; | 843 | VirtTarget *vtarget; |
844 | u8 id, channel; | 844 | u8 id, channel; |
845 | struct sas_rphy *rphy; | 845 | struct sas_rphy *rphy; |
@@ -908,7 +908,7 @@ static void | |||
908 | mptsas_target_destroy(struct scsi_target *starget) | 908 | mptsas_target_destroy(struct scsi_target *starget) |
909 | { | 909 | { |
910 | struct Scsi_Host *host = dev_to_shost(&starget->dev); | 910 | struct Scsi_Host *host = dev_to_shost(&starget->dev); |
911 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 911 | MPT_SCSI_HOST *hd = shost_priv(host); |
912 | struct sas_rphy *rphy; | 912 | struct sas_rphy *rphy; |
913 | struct mptsas_portinfo *p; | 913 | struct mptsas_portinfo *p; |
914 | int i; | 914 | int i; |
@@ -941,7 +941,7 @@ static int | |||
941 | mptsas_slave_alloc(struct scsi_device *sdev) | 941 | mptsas_slave_alloc(struct scsi_device *sdev) |
942 | { | 942 | { |
943 | struct Scsi_Host *host = sdev->host; | 943 | struct Scsi_Host *host = sdev->host; |
944 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)host->hostdata; | 944 | MPT_SCSI_HOST *hd = shost_priv(host); |
945 | struct sas_rphy *rphy; | 945 | struct sas_rphy *rphy; |
946 | struct mptsas_portinfo *p; | 946 | struct mptsas_portinfo *p; |
947 | VirtDevice *vdevice; | 947 | VirtDevice *vdevice; |
@@ -3215,7 +3215,7 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
3215 | sh->sg_tablesize = numSGE; | 3215 | sh->sg_tablesize = numSGE; |
3216 | } | 3216 | } |
3217 | 3217 | ||
3218 | hd = (MPT_SCSI_HOST *) sh->hostdata; | 3218 | hd = shost_priv(sh); |
3219 | hd->ioc = ioc; | 3219 | hd->ioc = ioc; |
3220 | 3220 | ||
3221 | /* SCSI needs scsi_cmnd lookup table! | 3221 | /* SCSI needs scsi_cmnd lookup table! |