/* Returns true if there is a scsi end device  */
static int mptsas_is_end_device(struct mptsas_devinfo *attached)
/* Returns true if there is a scsi end device  */
static int mptsas_is_end_device(struct mptsas_devinfo *attached)
{
	if ((attached->sas_address) &&
	    (attached->device_info &
	    MPI_SAS_DEVICE_INFO_END_DEVICE) &&
	    ((attached->device_info &
	    MPI_SAS_DEVICE_INFO_SSP_TARGET) |
	    (attached->device_info &
	    MPI_SAS_DEVICE_INFO_STP_TARGET) |
	    (attached->device_info &
	    MPI_SAS_DEVICE_INFO_SATA_DEVICE)))
		return 1;
	else
		return 0;
}