Skip to contentSkip to conversation

remove __scsi_add_host

PATCH New Christoph Hellwig 1 participant 1 message Feb 4, 2003 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remove __scsi_add_host

now that scsi_add_host accepts a NMULL dev argument we don't need it anymore.

drivers/scsi/hosts.c +15 -19
@@ -285,7 +285,15 @@
 	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 @@
 	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) {
@@ -306,23 +319,6 @@
 }
 
 /**
- * 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 +507,7 @@
 	 */
 	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;