/* Return value: resource entry pointer if found / NULL if not found  */
static struct ipr_resource_entry* ipr_find_sdev(struct scsi_device *sdev)
/* Return value: resource entry pointer if found / NULL if not found  */
static struct ipr_resource_entry* ipr_find_sdev(struct scsi_device *sdev)
{
	struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata;
	struct ipr_resource_entry *res;
	list_for_each_entry(res, &ioa_cfg->used_res_q, queue) {
		if ((res->cfgte.res_addr.bus == sdev->channel) &&
		    (res->cfgte.res_addr.target == sdev->id) &&
		    (res->cfgte.res_addr.lun == sdev->lun))
			return res;
	}
	return NULL;
}