Loading drivers/pnp/driver.c +8 −4 Original line number Original line Diff line number Diff line Loading @@ -160,10 +160,16 @@ struct bus_type pnp_bus_type = { }; }; static int count_devices(struct device * dev, void * c) { int * count = c; (*count)++; return 0; } int pnp_register_driver(struct pnp_driver *drv) int pnp_register_driver(struct pnp_driver *drv) { { int count; int count; struct list_head *pos; pnp_dbg("the driver '%s' has been registered", drv->name); pnp_dbg("the driver '%s' has been registered", drv->name); Loading @@ -177,9 +183,7 @@ int pnp_register_driver(struct pnp_driver *drv) /* get the number of initial matches */ /* get the number of initial matches */ if (count >= 0){ if (count >= 0){ count = 0; count = 0; list_for_each(pos,&drv->driver.devices){ driver_for_each_device(&drv->driver, NULL, &count, count_devices); count++; } } } return count; return count; } } Loading Loading
drivers/pnp/driver.c +8 −4 Original line number Original line Diff line number Diff line Loading @@ -160,10 +160,16 @@ struct bus_type pnp_bus_type = { }; }; static int count_devices(struct device * dev, void * c) { int * count = c; (*count)++; return 0; } int pnp_register_driver(struct pnp_driver *drv) int pnp_register_driver(struct pnp_driver *drv) { { int count; int count; struct list_head *pos; pnp_dbg("the driver '%s' has been registered", drv->name); pnp_dbg("the driver '%s' has been registered", drv->name); Loading @@ -177,9 +183,7 @@ int pnp_register_driver(struct pnp_driver *drv) /* get the number of initial matches */ /* get the number of initial matches */ if (count >= 0){ if (count >= 0){ count = 0; count = 0; list_for_each(pos,&drv->driver.devices){ driver_for_each_device(&drv->driver, NULL, &count, count_devices); count++; } } } return count; return count; } } Loading