diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-01-16 01:14:38 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-02-17 17:48:17 +0100 |
commit | 64d8d46f5f501a19aec4db7ff93faf1b831d05ed (patch) | |
tree | eae12e7cfea8259449eb14da6e449938773ac1fe /drivers/pcmcia/pcmcia_resource.c | |
parent | 9e86749cff70fca505c7c1a9dc760d193f27a059 (diff) |
pcmcia: properly lock skt->irq, skt->irq_mask
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/pcmcia_resource.c')
-rw-r--r-- | drivers/pcmcia/pcmcia_resource.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c index f365ecb9c5cd..f0de7b8b123b 100644 --- a/drivers/pcmcia/pcmcia_resource.c +++ b/drivers/pcmcia/pcmcia_resource.c @@ -419,7 +419,9 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req) dev_dbg(&s->dev, "IRQ attributes must match assigned ones\n"); return -EINVAL; } + mutex_lock(&s->ops_mutex); if (s->irq.AssignedIRQ != req->AssignedIRQ) { + mutex_unlock(&s->ops_mutex); dev_dbg(&s->dev, "IRQ must match assigned one\n"); return -EINVAL; } @@ -434,6 +436,7 @@ static int pcmcia_release_irq(struct pcmcia_device *p_dev, irq_req_t *req) #ifdef CONFIG_PCMCIA_PROBE pcmcia_used_irq[req->AssignedIRQ]--; #endif + mutex_unlock(&s->ops_mutex); return 0; } /* pcmcia_release_irq */ |