summaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion/mptctl.c
diff options
context:
space:
mode:
authorEric Moore <eric.moore@lsi.com>2007-09-29 10:15:59 -0600
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:52:08 -0400
commite7eae9f6e94cd49261c2997b0b4f768c1351bc02 (patch)
treed82cd39d6d997fc650a0fae933ecaf7514e4e7de /drivers/message/fusion/mptctl.c
parentcce99c6925b8d6a59cf584411277c1c20c330334 (diff)
downloadblackbird-op-linux-e7eae9f6e94cd49261c2997b0b4f768c1351bc02.tar.gz
blackbird-op-linux-e7eae9f6e94cd49261c2997b0b4f768c1351bc02.zip
[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/mptctl.c')
-rw-r--r--drivers/message/fusion/mptctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/message/fusion/mptctl.c b/drivers/message/fusion/mptctl.c
index b7d1159916c2..70178a8940b2 100644
--- a/drivers/message/fusion/mptctl.c
+++ b/drivers/message/fusion/mptctl.c
@@ -348,7 +348,7 @@ static int mptctl_bus_reset(MPT_IOCTL *ioctl)
if (ioctl->ioc->sh == NULL)
return -EPERM;
- hd = (MPT_SCSI_HOST *) ioctl->ioc->sh->hostdata;
+ hd = shost_priv(ioctl->ioc->sh);
if (hd == NULL)
return -EPERM;
@@ -449,7 +449,7 @@ mptctl_free_tm_flags(MPT_ADAPTER *ioc)
MPT_SCSI_HOST * hd;
unsigned long flags;
- hd = (MPT_SCSI_HOST *) ioc->sh->hostdata;
+ hd = shost_priv(ioc->sh);
if (hd == NULL)
return;
@@ -2026,7 +2026,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr)
case MPI_FUNCTION_SCSI_TASK_MGMT:
{
MPT_SCSI_HOST *hd = NULL;
- if ((ioc->sh == NULL) || ((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL)) {
+ if ((ioc->sh == NULL) || ((hd = shost_priv(ioc->sh)) == NULL)) {
printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - "
"SCSI driver not loaded or SCSI host not found. \n",
ioc->name, __FILE__, __LINE__);
@@ -2466,7 +2466,7 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size)
karg.soft_resets = 0;
karg.timeouts = 0;
if (ioc->sh != NULL) {
- MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
+ MPT_SCSI_HOST *hd = shost_priv(ioc->sh);
if (hd && (cim_rev == 1)) {
karg.hard_resets = hd->hard_resets;
@@ -2683,7 +2683,7 @@ mptctl_hp_targetinfo(unsigned long arg)
pci_free_consistent(ioc->pcidev, data_sz, (u8 *) pg3_alloc, page_dma);
}
}
- hd = (MPT_SCSI_HOST *) ioc->sh->hostdata;
+ hd = shost_priv(ioc->sh);
if (hd != NULL)
karg.select_timeouts = hd->sel_timeout[karg.hdr.id];
OpenPOWER on IntegriCloud