Commit e2607484 authored by Mike Christie's avatar Mike Christie Committed by Martin K. Petersen

scsi: target: remove target_find_device

target_find_device is no longer used, so remove it.
Signed-off-by: default avatarMike Christie <mchristi@redhat.com>
Tested-by: default avatarXiubo Li <xiubli@redhat.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent bdaeedc1
......@@ -879,30 +879,6 @@ sector_t target_to_linux_sector(struct se_device *dev, sector_t lb)
}
EXPORT_SYMBOL(target_to_linux_sector);
/**
* target_find_device - find a se_device by its dev_index
* @id: dev_index
* @do_depend: true if caller needs target_depend_item to be done
*
* If do_depend is true, the caller must do a target_undepend_item
* when finished using the device.
*
* If do_depend is false, the caller must be called in a configfs
* callback or during removal.
*/
struct se_device *target_find_device(int id, bool do_depend)
{
struct se_device *dev;
mutex_lock(&device_mutex);
dev = idr_find(&devices_idr, id);
if (dev && do_depend && target_depend_item(&dev->dev_group.cg_item))
dev = NULL;
mutex_unlock(&device_mutex);
return dev;
}
EXPORT_SYMBOL(target_find_device);
struct devices_idr_iter {
int (*fn)(struct se_device *dev, void *data);
void *data;
......
......@@ -106,8 +106,6 @@ bool target_lun_is_rdonly(struct se_cmd *);
sense_reason_t passthrough_parse_cdb(struct se_cmd *cmd,
sense_reason_t (*exec_cmd)(struct se_cmd *cmd));
struct se_device *target_find_device(int id, bool do_depend);
bool target_sense_desc_format(struct se_device *dev);
sector_t target_to_linux_sector(struct se_device *dev, sector_t lb);
bool target_configure_unmap_from_queue(struct se_dev_attrib *attrib,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment