/* Lookup bus/target/lun and retrun corresponding struct hpsa_scsi_dev_t * Assume's h->devlock is held.  */
static struct hpsa_scsi_dev_t* lookup_hpsa_scsi_dev(struct ctlr_info *h, int bus, int target, int lun)
/* Lookup bus/target/lun and retrun corresponding struct hpsa_scsi_dev_t * Assume's h->devlock is held.  */
static struct hpsa_scsi_dev_t* lookup_hpsa_scsi_dev(struct ctlr_info *h, int bus, int target, int lun)
{
	int i;
	struct hpsa_scsi_dev_t *sd;
	for (i = 0; i < h->ndevices; i++) {
		sd = h->dev[i];
		if (sd->bus == bus && sd->target == target && sd->lun == lun)
			return sd;
	}
	return NULL;
}