diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-01-16 09:14:11 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-02-17 17:48:20 +0100 |
commit | 00ce99ff506a17882747a7d6874e3f5206a99043 (patch) | |
tree | 571f5b106f25f35f326d456123c4af85147c3bce /drivers/pcmcia/rsrc_mgr.c | |
parent | 3d3de32fad19e37695e6649136e4cb17f9d46329 (diff) |
pcmcia: simplify locking
replace pcmcia_socket->lock and pcmcia_dev_list_lock by using the
per-socket "ops_mutex", as we do neither need different locks
nor a spinlock here.
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/rsrc_mgr.c')
-rw-r--r-- | drivers/pcmcia/rsrc_mgr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c index cdd30c180066..b81586622d02 100644 --- a/drivers/pcmcia/rsrc_mgr.c +++ b/drivers/pcmcia/rsrc_mgr.c @@ -23,14 +23,12 @@ static int static_init(struct pcmcia_socket *s) { - unsigned long flags; - /* the good thing about SS_CAP_STATIC_MAP sockets is * that they don't need a resource database */ - spin_lock_irqsave(&s->lock, flags); + mutex_lock(&s->ops_mutex); s->resource_setup_done = 1; - spin_unlock_irqrestore(&s->lock, flags); + mutex_unlock(&s->ops_mutex); return 0; } |