linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / zorro / zorro-driver.c
index 067c07b..fcbee74 100644 (file)
@@ -65,17 +65,22 @@ static int zorro_device_probe(struct device *dev)
      *  @drv: the driver structure to register
      *
      *  Adds the driver structure to the list of registered drivers
-     *  Returns zero or a negative error value.
+     *  Returns the number of Zorro devices which were claimed by the driver
+     *  during registration.  The driver remains registered even if the
+     *  return value is zero.
      */
 
 int zorro_register_driver(struct zorro_driver *drv)
 {
+       int count = 0;
+
        /* initialize common driver fields */
        drv->driver.name = drv->name;
        drv->driver.bus = &zorro_bus_type;
 
        /* register with core */
-       return driver_register(&drv->driver);
+       count = driver_register(&drv->driver);
+       return count ? count : 1;
 }