diff options
-rw-r--r-- | drivers/scsi/hpsa.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index 320d6863c44e..e81df76df821 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c | |||
@@ -197,6 +197,12 @@ static inline struct ctlr_info *sdev_to_hba(struct scsi_device *sdev) | |||
197 | return (struct ctlr_info *) *priv; | 197 | return (struct ctlr_info *) *priv; |
198 | } | 198 | } |
199 | 199 | ||
200 | static inline struct ctlr_info *shost_to_hba(struct Scsi_Host *sh) | ||
201 | { | ||
202 | unsigned long *priv = shost_priv(sh); | ||
203 | return (struct ctlr_info *) *priv; | ||
204 | } | ||
205 | |||
200 | static struct task_struct *hpsa_scan_thread; | 206 | static struct task_struct *hpsa_scan_thread; |
201 | static DEFINE_MUTEX(hpsa_scan_mutex); | 207 | static DEFINE_MUTEX(hpsa_scan_mutex); |
202 | static LIST_HEAD(hpsa_scan_q); | 208 | static LIST_HEAD(hpsa_scan_q); |
@@ -381,8 +387,7 @@ static ssize_t host_store_rescan(struct device *dev, | |||
381 | { | 387 | { |
382 | struct ctlr_info *h; | 388 | struct ctlr_info *h; |
383 | struct Scsi_Host *shost = class_to_shost(dev); | 389 | struct Scsi_Host *shost = class_to_shost(dev); |
384 | unsigned long *priv = shost_priv(shost); | 390 | h = shost_to_hba(shost); |
385 | h = (struct ctlr_info *) *priv; | ||
386 | if (add_to_scan_list(h)) { | 391 | if (add_to_scan_list(h)) { |
387 | wake_up_process(hpsa_scan_thread); | 392 | wake_up_process(hpsa_scan_thread); |
388 | wait_for_completion_interruptible(&h->scan_wait); | 393 | wait_for_completion_interruptible(&h->scan_wait); |