Commit ed12fbdd authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Christoph Hellwig

[PATCH] remove __scsi_add_host

now that scsi_add_host accepts a NMULL dev argument we don't need it
anymore.
parent 82ae989b
......@@ -285,7 +285,15 @@ int scsi_remove_host(struct Scsi_Host *shost)
return 0;
}
int __scsi_add_host(struct Scsi_Host *shost)
/**
* scsi_add_host - add a scsi host
* @shost: scsi host pointer to add
* @dev: a struct device of type scsi class
*
* Return value:
* 0 on success / != 0 for error
**/
int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
{
Scsi_Host_Template *sht = shost->hostt;
struct scsi_device *sdev;
......@@ -294,6 +302,11 @@ int __scsi_add_host(struct Scsi_Host *shost)
printk(KERN_INFO "scsi%d : %s\n", shost->host_no,
sht->info ? sht->info(shost) : sht->name);
if (dev) {
dev->class_data = shost;
shost->host_gendev = dev;
}
scsi_scan_host(shost);
list_for_each_entry (sdev, &shost->my_devices, siblings) {
......@@ -305,23 +318,6 @@ int __scsi_add_host(struct Scsi_Host *shost)
return saved_error;
}
/**
* scsi_add_host - add a scsi host
* @shost: scsi host pointer to add
* @dev: a struct device of type scsi class
*
* Return value:
* 0 on success / != 0 for error
**/
int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
{
if (dev) {
dev->class_data = shost;
shost->host_gendev = dev;
}
return __scsi_add_host(shost);
}
/**
* scsi_unregister - unregister a scsi host
* @shost: scsi host to be unregistered
......@@ -523,7 +519,7 @@ int scsi_register_host(Scsi_Host_Template *shost_tp)
*/
list_for_each_entry(shost, &scsi_host_list, sh_list)
if (shost->hostt == shost_tp)
if (__scsi_add_host(shost))
if (scsi_add_host(shost, NULL))
goto out_of_space;
return 0;
......
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