aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-04-09 11:52:31 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-04-27 13:57:30 -0400
commit75f1115c9b1a0c24d9025865285870122ec6f811 (patch)
tree37bc6ad7c2e06eefad94041ce20f71600ecd2b94 /drivers/pnp
parent341487a837c02cbd674d4751061e7d098b0b8e98 (diff)
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>
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/card.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index 91c047a7e635..dd6384b1efce 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -311,7 +311,6 @@ done:
311 return NULL; 311 return NULL;
312 312
313found: 313found:
314 down_write(&dev->dev.bus->subsys.rwsem);
315 dev->card_link = clink; 314 dev->card_link = clink;
316 dev->dev.driver = &drv->link.driver; 315 dev->dev.driver = &drv->link.driver;
317 if (pnp_bus_type.probe(&dev->dev)) 316 if (pnp_bus_type.probe(&dev->dev))
@@ -319,14 +318,11 @@ found:
319 if (device_bind_driver(&dev->dev)) 318 if (device_bind_driver(&dev->dev))
320 goto err_out; 319 goto err_out;
321 320
322 up_write(&dev->dev.bus->subsys.rwsem);
323
324 return dev; 321 return dev;
325 322
326err_out: 323err_out:
327 dev->dev.driver = NULL; 324 dev->dev.driver = NULL;
328 dev->card_link = NULL; 325 dev->card_link = NULL;
329 up_write(&dev->dev.bus->subsys.rwsem);
330 return NULL; 326 return NULL;
331} 327}
332 328
@@ -340,11 +336,9 @@ void pnp_release_card_device(struct pnp_dev * dev)
340 struct pnp_card_driver * drv = dev->card_link->driver; 336 struct pnp_card_driver * drv = dev->card_link->driver;
341 if (!drv) 337 if (!drv)
342 return; 338 return;
343 down_write(&dev->dev.bus->subsys.rwsem);
344 drv->link.remove = &card_remove; 339 drv->link.remove = &card_remove;
345 device_release_driver(&dev->dev); 340 device_release_driver(&dev->dev);
346 drv->link.remove = &card_remove_first; 341 drv->link.remove = &card_remove_first;
347 up_write(&dev->dev.bus->subsys.rwsem);
348} 342}
349 343
350/* 344/*