patch-2.4.8 linux/drivers/ieee1394/hosts.c
Next file: linux/drivers/ieee1394/ieee1394_core.c
Previous file: linux/drivers/ide/sis5513.c
Back to the patch index
Back to the overall index
-  Lines: 27
-  Date:
Sun Jul 29 10:48:33 2001
-  Orig file: 
v2.4.7/linux/drivers/ieee1394/hosts.c
-  Orig date: 
Wed Jul 25 17:10:20 2001
diff -u --recursive --new-file v2.4.7/linux/drivers/ieee1394/hosts.c linux/drivers/ieee1394/hosts.c
@@ -147,10 +147,6 @@
         int count;
         struct hpsb_host *host;
 
-	/* PCI cards should register one host at a time */
-	if (tmpl->detect_hosts == NULL)
-		return;
-
         count = tmpl->detect_hosts(tmpl);
 
         for (host = tmpl->hosts; host != NULL; host = host->next) {
@@ -254,8 +250,13 @@
 int hpsb_register_lowlevel(struct hpsb_host_template *tmpl)
 {
         add_template(tmpl);
-        HPSB_DEBUG("Registered %s driver, initializing now", tmpl->name);
-        init_hosts(tmpl);
+
+	/* PCI cards should be smart and use the PCI detection layer, and
+	 * not this one shot deal. detect_hosts() will be obsoleted soon. */
+	if (tmpl->detect_hosts != NULL) {
+		HPSB_DEBUG("Registered %s driver, initializing now", tmpl->name);
+		init_hosts(tmpl);
+	}
 
         return 0;
 }
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)