diff options
author | Stephen M. Cameron <scameron@beardog.cce.hp.com> | 2010-02-04 15:43:11 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-02-17 20:22:01 +0100 |
commit | a23513e8413e02b7e34e96a03d6bfd1c1948ac00 (patch) | |
tree | 160fe25ac295679b1bb4af015fc973698db49f6b /drivers | |
parent | [SCSI] hpsa: Don't return DID_NO_CONNECT when a device is merely not ready (diff) | |
download | linux-a23513e8413e02b7e34e96a03d6bfd1c1948ac00.tar.xz linux-a23513e8413e02b7e34e96a03d6bfd1c1948ac00.zip |
[SCSI] hpsa: Add an shost_to_hba helper function.
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers')
-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) return (struct ctlr_info *) *priv; } +static inline struct ctlr_info *shost_to_hba(struct Scsi_Host *sh) +{ + unsigned long *priv = shost_priv(sh); + return (struct ctlr_info *) *priv; +} + static struct task_struct *hpsa_scan_thread; static DEFINE_MUTEX(hpsa_scan_mutex); static LIST_HEAD(hpsa_scan_q); @@ -381,8 +387,7 @@ static ssize_t host_store_rescan(struct device *dev, { struct ctlr_info *h; struct Scsi_Host *shost = class_to_shost(dev); - unsigned long *priv = shost_priv(shost); - h = (struct ctlr_info *) *priv; + h = shost_to_hba(shost); if (add_to_scan_list(h)) { wake_up_process(hpsa_scan_thread); wait_for_completion_interruptible(&h->scan_wait); |