X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fdio%2Fdio-driver.c;h=e4c48e329367d93617635e65a671ffb2816a47f7;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=ffe6f44ac76fcb080e976584c7499f1ace73e13d;hpb=cee37fe97739d85991964371c1f3a745c00dd236;p=linux-2.6.git diff --git a/drivers/dio/dio-driver.c b/drivers/dio/dio-driver.c index ffe6f44ac..e4c48e329 100644 --- a/drivers/dio/dio-driver.c +++ b/drivers/dio/dio-driver.c @@ -71,23 +71,17 @@ static int dio_device_probe(struct device *dev) * @drv: the driver structure to register * * Adds the driver structure to the list of registered drivers - * Returns the number of DIO devices which were claimed by the driver - * during registration. The driver remains registered even if the - * return value is zero. + * Returns zero or a negative error value. */ int dio_register_driver(struct dio_driver *drv) { - int count = 0; - /* initialize common driver fields */ drv->driver.name = drv->name; drv->driver.bus = &dio_bus_type; - drv->driver.probe = dio_device_probe; /* register with core */ - count = driver_register(&drv->driver); - return count ? count : 1; + return driver_register(&drv->driver); } @@ -145,7 +139,8 @@ static int dio_bus_match(struct device *dev, struct device_driver *drv) struct bus_type dio_bus_type = { .name = "dio", - .match = dio_bus_match + .match = dio_bus_match, + .probe = dio_device_probe, };