/* Returns 0 on success, -EBUSY if handler already registered.  */
int scsi_register_device_handler(struct scsi_device_handler *scsi_dh)
/* Returns 0 on success, -EBUSY if handler already registered.  */
int scsi_register_device_handler(struct scsi_device_handler *scsi_dh)
{
	if (get_device_handler(scsi_dh->name))
		return -EBUSY;
	spin_lock(&list_lock);
	list_add(&scsi_dh->list, &scsi_dh_list);
	spin_unlock(&list_lock);
	bus_for_each_dev(&scsi_bus_type, NULL, scsi_dh, scsi_dh_notifier_add);
	printk(KERN_INFO "%s: device handler registered\n", scsi_dh->name);
	return SCSI_DH_OK;
}