Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98257
b: refs/heads/master
c: 3ed7897
h: refs/heads/master
i:
  98255: 6570723
v: v3
  • Loading branch information
Mike Christie authored and James Bottomley committed Jun 15, 2008
1 parent 5eb7055 commit 35b1548
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d1daeabf0da5bfa1943272ce508e2ba785730bf0
refs/heads/master: 3ed7897242b7efe977f3a8d06d4e5a4ebe28b10e
9 changes: 7 additions & 2 deletions trunk/drivers/scsi/hosts.c
Original file line number Diff line number Diff line change
Expand Up @@ -456,16 +456,21 @@ static int __scsi_host_match(struct device *dev, void *data)
*
* Return value:
* A pointer to located Scsi_Host or NULL.
*
* The caller must do a scsi_host_put() to drop the reference
* that scsi_host_get() took. The put_device() below dropped
* the reference from class_find_device().
**/
struct Scsi_Host *scsi_host_lookup(unsigned short hostnum)
{
struct device *cdev;
struct Scsi_Host *shost = ERR_PTR(-ENXIO);

cdev = class_find_device(&shost_class, &hostnum, __scsi_host_match);
if (cdev)
if (cdev) {
shost = scsi_host_get(class_to_shost(cdev));

put_device(cdev);
}
return shost;
}
EXPORT_SYMBOL(scsi_host_lookup);
Expand Down

0 comments on commit 35b1548

Please sign in to comment.