Commit 75f1115c9b1a0c24d9025865285870122ec6f811
1 parent
341487a837
Exists in
master
and in
39 other branches
PNP: stop using the subsystem rwsem
The rwsem is not used to protect anything, so the use of it by the PNP subsystem isn't really useful, and it's doubtful if it really did anything or not. So I've removed it. Cc: Adam Belay <ambx1@neo.rr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 1 changed file with 0 additions and 6 deletions Side-by-side Diff
drivers/pnp/card.c
... | ... | @@ -311,7 +311,6 @@ |
311 | 311 | return NULL; |
312 | 312 | |
313 | 313 | found: |
314 | - down_write(&dev->dev.bus->subsys.rwsem); | |
315 | 314 | dev->card_link = clink; |
316 | 315 | dev->dev.driver = &drv->link.driver; |
317 | 316 | if (pnp_bus_type.probe(&dev->dev)) |
318 | 317 | |
... | ... | @@ -319,14 +318,11 @@ |
319 | 318 | if (device_bind_driver(&dev->dev)) |
320 | 319 | goto err_out; |
321 | 320 | |
322 | - up_write(&dev->dev.bus->subsys.rwsem); | |
323 | - | |
324 | 321 | return dev; |
325 | 322 | |
326 | 323 | err_out: |
327 | 324 | dev->dev.driver = NULL; |
328 | 325 | dev->card_link = NULL; |
329 | - up_write(&dev->dev.bus->subsys.rwsem); | |
330 | 326 | return NULL; |
331 | 327 | } |
332 | 328 | |
333 | 329 | |
... | ... | @@ -340,11 +336,9 @@ |
340 | 336 | struct pnp_card_driver * drv = dev->card_link->driver; |
341 | 337 | if (!drv) |
342 | 338 | return; |
343 | - down_write(&dev->dev.bus->subsys.rwsem); | |
344 | 339 | drv->link.remove = &card_remove; |
345 | 340 | device_release_driver(&dev->dev); |
346 | 341 | drv->link.remove = &card_remove_first; |
347 | - up_write(&dev->dev.bus->subsys.rwsem); | |
348 | 342 | } |
349 | 343 | |
350 | 344 | /* |