X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=drivers%2Fpnp%2Fdriver.c;h=e161423b4300d7f76c6f2b5a207362e2e4688ed1;hb=026477c1141b67e98e3bd8bdedb7d4b88a3ecd09;hp=7cafacdd12b0a4dae9fea941b3b8efc0076fea85;hpb=150a631fc55e33df28a6846371e7f86e9e75e8cb;p=powerpc.git diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c index 7cafacdd12..e161423b43 100644 --- a/drivers/pnp/driver.c +++ b/drivers/pnp/driver.c @@ -5,7 +5,6 @@ * */ -#include #include #include #include @@ -201,31 +200,14 @@ struct bus_type pnp_bus_type = { .resume = pnp_bus_resume, }; - -static int count_devices(struct device * dev, void * c) -{ - int * count = c; - (*count)++; - return 0; -} - int pnp_register_driver(struct pnp_driver *drv) { - int count; - pnp_dbg("the driver '%s' has been registered", drv->name); drv->driver.name = drv->name; drv->driver.bus = &pnp_bus_type; - count = driver_register(&drv->driver); - - /* get the number of initial matches */ - if (count >= 0){ - count = 0; - driver_for_each_device(&drv->driver, NULL, &count, count_devices); - } - return count; + return driver_register(&drv->driver); } void pnp_unregister_driver(struct pnp_driver *drv)