Skip to content

Commit

Permalink
PNP: stop using the subsystem rwsem
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
gregkh committed Apr 27, 2007
1 parent 341487a commit 75f1115
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions drivers/pnp/card.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,22 +311,18 @@ struct pnp_dev * pnp_request_card_device(struct pnp_card_link *clink, const char
return NULL;

found:
down_write(&dev->dev.bus->subsys.rwsem);
dev->card_link = clink;
dev->dev.driver = &drv->link.driver;
if (pnp_bus_type.probe(&dev->dev))
goto err_out;
if (device_bind_driver(&dev->dev))
goto err_out;

up_write(&dev->dev.bus->subsys.rwsem);

return dev;

err_out:
dev->dev.driver = NULL;
dev->card_link = NULL;
up_write(&dev->dev.bus->subsys.rwsem);
return NULL;
}

Expand All @@ -340,11 +336,9 @@ void pnp_release_card_device(struct pnp_dev * dev)
struct pnp_card_driver * drv = dev->card_link->driver;
if (!drv)
return;
down_write(&dev->dev.bus->subsys.rwsem);
drv->link.remove = &card_remove;
device_release_driver(&dev->dev);
drv->link.remove = &card_remove_first;
up_write(&dev->dev.bus->subsys.rwsem);
}

/*
Expand Down

0 comments on commit 75f1115

Please sign in to comment.