/* This searches for sas_device based on sas_address, then return sas_device object.  */
struct _sas_device* mpt2sas_scsih_sas_device_find_by_sas_address(struct MPT2SAS_ADAPTER *ioc, u64 sas_address)
/* This searches for sas_device based on sas_address, then return sas_device object.  */
struct _sas_device* mpt2sas_scsih_sas_device_find_by_sas_address(struct MPT2SAS_ADAPTER *ioc, u64 sas_address)
{
	struct _sas_device *sas_device, *r;
	r = NULL;
	list_for_each_entry(sas_device, &ioc->sas_device_init_list,
	    list) {
		if (sas_device->sas_address != sas_address)
			continue;
		r = sas_device;
		goto out;
	}
	list_for_each_entry(sas_device, &ioc->sas_device_list, list) {
		if (sas_device->sas_address != sas_address)
			continue;
		r = sas_device;
		goto out;
	}
 out:
	return r;
}