diff options
-rw-r--r-- | drivers/pnp/card.c | 6 |
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 | ||
313 | found: | 313 | found: |
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 | ||
326 | err_out: | 323 | err_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 | /* |