diff options
Diffstat (limited to 'drivers/message/fusion/mptctl.c')
-rw-r--r-- | drivers/message/fusion/mptctl.c | 10 |
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) | |||
348 | if (ioctl->ioc->sh == NULL) | 348 | if (ioctl->ioc->sh == NULL) |
349 | return -EPERM; | 349 | return -EPERM; |
350 | 350 | ||
351 | hd = (MPT_SCSI_HOST *) ioctl->ioc->sh->hostdata; | 351 | hd = shost_priv(ioctl->ioc->sh); |
352 | if (hd == NULL) | 352 | if (hd == NULL) |
353 | return -EPERM; | 353 | return -EPERM; |
354 | 354 | ||
@@ -449,7 +449,7 @@ mptctl_free_tm_flags(MPT_ADAPTER *ioc) | |||
449 | MPT_SCSI_HOST * hd; | 449 | MPT_SCSI_HOST * hd; |
450 | unsigned long flags; | 450 | unsigned long flags; |
451 | 451 | ||
452 | hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; | 452 | hd = shost_priv(ioc->sh); |
453 | if (hd == NULL) | 453 | if (hd == NULL) |
454 | return; | 454 | return; |
455 | 455 | ||
@@ -2026,7 +2026,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_command karg, void __user *mfPtr) | |||
2026 | case MPI_FUNCTION_SCSI_TASK_MGMT: | 2026 | case MPI_FUNCTION_SCSI_TASK_MGMT: |
2027 | { | 2027 | { |
2028 | MPT_SCSI_HOST *hd = NULL; | 2028 | MPT_SCSI_HOST *hd = NULL; |
2029 | if ((ioc->sh == NULL) || ((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL)) { | 2029 | if ((ioc->sh == NULL) || ((hd = shost_priv(ioc->sh)) == NULL)) { |
2030 | printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - " | 2030 | printk(MYIOC_s_ERR_FMT "%s@%d::mptctl_do_mpt_command - " |
2031 | "SCSI driver not loaded or SCSI host not found. \n", | 2031 | "SCSI driver not loaded or SCSI host not found. \n", |
2032 | ioc->name, __FILE__, __LINE__); | 2032 | ioc->name, __FILE__, __LINE__); |
@@ -2466,7 +2466,7 @@ mptctl_hp_hostinfo(unsigned long arg, unsigned int data_size) | |||
2466 | karg.soft_resets = 0; | 2466 | karg.soft_resets = 0; |
2467 | karg.timeouts = 0; | 2467 | karg.timeouts = 0; |
2468 | if (ioc->sh != NULL) { | 2468 | if (ioc->sh != NULL) { |
2469 | MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *)ioc->sh->hostdata; | 2469 | MPT_SCSI_HOST *hd = shost_priv(ioc->sh); |
2470 | 2470 | ||
2471 | if (hd && (cim_rev == 1)) { | 2471 | if (hd && (cim_rev == 1)) { |
2472 | karg.hard_resets = hd->hard_resets; | 2472 | karg.hard_resets = hd->hard_resets; |
@@ -2683,7 +2683,7 @@ mptctl_hp_targetinfo(unsigned long arg) | |||
2683 | pci_free_consistent(ioc->pcidev, data_sz, (u8 *) pg3_alloc, page_dma); | 2683 | pci_free_consistent(ioc->pcidev, data_sz, (u8 *) pg3_alloc, page_dma); |
2684 | } | 2684 | } |
2685 | } | 2685 | } |
2686 | hd = (MPT_SCSI_HOST *) ioc->sh->hostdata; | 2686 | hd = shost_priv(ioc->sh); |
2687 | if (hd != NULL) | 2687 | if (hd != NULL) |
2688 | karg.select_timeouts = hd->sel_timeout[karg.hdr.id]; | 2688 | karg.select_timeouts = hd->sel_timeout[karg.hdr.id]; |
2689 | 2689 | ||