[parisc-linux-cvs] Revert driver patch

Matthew Wilcox willy@ldl.fc.hp.com
Sat, 01 Sep 2001 02:32:27 -0600


Back out helge's patch; always add drivers to the list, even if
there's no device for them yet.

Index: arch/parisc/kernel/drivers.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/drivers.c,v
retrieving revision 1.21
diff -u -p -r1.21 drivers.c
--- drivers.c	2001/08/28 08:01:27	1.21
+++ drivers.c	2001/09/01 08:24:27
@@ -85,6 +85,13 @@ int register_parisc_driver(struct parisc
 	}
 
 	write_lock(&pa_lock);
+
+	/* Note that the list is in reverse order of registration.  This
+	 * may be significant if we ever actually support hotplug and have
+	 * multiple drivers capable of claiming the same chip.
+	 */
+	driver->next = pa_drivers;
+	pa_drivers = driver;
 	
 	for (i=0; i < num_devices; i++) {
 		struct parisc_device *device = &pa_devices[i];
@@ -96,16 +103,6 @@ int register_parisc_driver(struct parisc
 
 		if (driver->probe(device) == 0) {
 			device->driver = driver;
-			
-			/* link driver to the head of the global list.
-			 * The list gets built in reverse order...ideally, it shouldn't
-			 * matter but reality will eventually rear its ugly head.
-			 */
-			if (!driver->next) {
-				driver->next = pa_drivers;
-				pa_drivers = driver;
-			}
-			
 		} else {
 			printk(KERN_WARNING "Warning : device (%d, 0x%x, 0x%x, 0x%x) NOT claimed by %s\n",
 				device->id.hw_type, device->id.hversion,