/* Note: This is slightly racy. It is possible that if the user requests the addition of another device then the target won't be removed.  */
void scsi_remove_target(struct device *dev)
/* Note: This is slightly racy. It is possible that if the user requests the addition of another device then the target won't be removed.  */
void scsi_remove_target(struct device *dev)
{
	struct device *rdev;
	if (scsi_is_target_device(dev)) {
		__scsi_remove_target(to_scsi_target(dev));
		return;
	}
	rdev = get_device(dev);
	device_for_each_child(dev, NULL, __remove_child);
	put_device(rdev);
}