
From: Patrick Mochel <mochel@digitalimplant.org>

Revert Pat's earlier fix - it broke ppc64.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/base/dd.c |   33 +++++++++++++--------------------
 1 files changed, 13 insertions(+), 20 deletions(-)

diff -puN drivers/base/dd.c~bk-driver-core-fix drivers/base/dd.c
--- 25/drivers/base/dd.c~bk-driver-core-fix	2005-04-04 00:20:22.000000000 -0700
+++ 25-akpm/drivers/base/dd.c	2005-04-04 00:20:36.000000000 -0700
@@ -91,26 +91,22 @@ static int __device_attach(struct device
 	int error;
 
 	error = driver_probe_device(drv, dev);
-	if (error) {
-		if ((error == -ENODEV) || (error == -ENXIO)) {
-			/* Driver matched, but didn't support device 
-			 * or device not found.
-			 * Not an error; keep going.
-			 */
-			error = 0;
-		} else {
-			/* driver matched but the probe failed */
-			printk(KERN_WARNING
-			       "%s: probe of %s failed with error %d\n",
-			       drv->name, dev->bus_id, error);
-		}
-		return error;
+
+	if (error == -ENODEV && error == -ENXIO) {
+		/* Driver matched, but didn't support device
+		 * or device not found.
+		 * Not an error; keep going.
+		 */
+		error = 0;
+	} else {
+		/* driver matched but the probe failed */
+		printk(KERN_WARNING
+		       "%s: probe of %s failed with error %d\n",
+		       drv->name, dev->bus_id, error);
 	}
-	/* stop looking, this device is attached */
-	return 1;
+	return 0;
 }
 
-
 /**
  *	device_attach - try to attach device to a driver.
  *	@dev:	device.
@@ -145,10 +141,7 @@ static int __driver_attach(struct device
 				       drv->name, dev->bus_id, error);
 			} else
 				error = 0;
-			return error;
 		}
-		/* stop looking, this driver is attached */
-		return 1;
 	}
 	return 0;
 }
_
