/* Detach from a device handler. If a device handler is specified, only detach if the currently attached handler matches @scsi_dh.  */
static void scsi_dh_handler_detach(struct scsi_device *sdev, struct scsi_device_handler *scsi_dh)
/* Detach from a device handler. If a device handler is specified, only detach if the currently attached handler matches @scsi_dh.  */
static void scsi_dh_handler_detach(struct scsi_device *sdev, struct scsi_device_handler *scsi_dh)
{
	if (!sdev->scsi_dh_data)
		return;
	if (scsi_dh && scsi_dh != sdev->scsi_dh_data->scsi_dh)
		return;
	if (!scsi_dh)
		scsi_dh = sdev->scsi_dh_data->scsi_dh;
	if (scsi_dh && scsi_dh->detach)
		kref_put(&sdev->scsi_dh_data->kref, __detach_handler);
}