Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
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;
}
#ifdef CONFIG_PCMCIA_PROBE
pcmcia_used_irq[req->AssignedIRQ]--;
#endif
+ mutex_unlock(&s->ops_mutex);
return 0;
} /* pcmcia_release_irq */
ret = sscanf(buf, "0x%x\n", &mask);
if (ret == 1) {
+ mutex_lock(&s->ops_mutex);
s->irq_mask &= mask;
+ mutex_unlock(&s->ops_mutex);
ret = 0;
}