diff options
author | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-28 21:24:50 -0500 |
commit | bac30d1a78d0f11c613968fc8b351a91ed465386 (patch) | |
tree | e52f3c876522a2f6047a6ec1c27df2e8a79486b8 /drivers/pnp/driver.c | |
parent | e8222502ee6157e2713da9e0792c21f4ad458d50 (diff) | |
parent | ca9ba4471c1203bb6e759b76e83167fec54fe590 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'drivers/pnp/driver.c')
-rw-r--r-- | drivers/pnp/driver.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c index 7cafacdd12b0..e54c15383193 100644 --- a/drivers/pnp/driver.c +++ b/drivers/pnp/driver.c | |||
@@ -201,31 +201,14 @@ struct bus_type pnp_bus_type = { | |||
201 | .resume = pnp_bus_resume, | 201 | .resume = pnp_bus_resume, |
202 | }; | 202 | }; |
203 | 203 | ||
204 | |||
205 | static int count_devices(struct device * dev, void * c) | ||
206 | { | ||
207 | int * count = c; | ||
208 | (*count)++; | ||
209 | return 0; | ||
210 | } | ||
211 | |||
212 | int pnp_register_driver(struct pnp_driver *drv) | 204 | int pnp_register_driver(struct pnp_driver *drv) |
213 | { | 205 | { |
214 | int count; | ||
215 | |||
216 | pnp_dbg("the driver '%s' has been registered", drv->name); | 206 | pnp_dbg("the driver '%s' has been registered", drv->name); |
217 | 207 | ||
218 | drv->driver.name = drv->name; | 208 | drv->driver.name = drv->name; |
219 | drv->driver.bus = &pnp_bus_type; | 209 | drv->driver.bus = &pnp_bus_type; |
220 | 210 | ||
221 | count = driver_register(&drv->driver); | 211 | return driver_register(&drv->driver); |
222 | |||
223 | /* get the number of initial matches */ | ||
224 | if (count >= 0){ | ||
225 | count = 0; | ||
226 | driver_for_each_device(&drv->driver, NULL, &count, count_devices); | ||
227 | } | ||
228 | return count; | ||
229 | } | 212 | } |
230 | 213 | ||
231 | void pnp_unregister_driver(struct pnp_driver *drv) | 214 | void pnp_unregister_driver(struct pnp_driver *drv) |