/* Note: The only reason why drivers would want to use this is because they need to access the device list in irq context. Otherwise you really want to use scsi_device_lookup instead.  */
struct scsi_device* __scsi_device_lookup(struct Scsi_Host *shost, uint channel, uint id, uint lun)
/* Note: The only reason why drivers would want to use this is because they need to access the device list in irq context. Otherwise you really want to use scsi_device_lookup instead.  */
struct scsi_device* __scsi_device_lookup(struct Scsi_Host *shost, uint channel, uint id, uint lun)
{
	struct scsi_device *sdev;
	list_for_each_entry(sdev, &shost->__devices, siblings) {
		if (sdev->channel == channel && sdev->id == id &&
				sdev->lun ==lun)
			return sdev;
	}
	return NULL;
}