提交 98250221 编写于 作者: R Russell King

MFD: mcp-core: fix complaints from the genirq layer

The genirq layer complains if an interrupt handler returns with
interrupts enabled.  The UCB1x00 handler does just this, because
ucb1x00_enable() calls mcp_enable(), which uses spin_lock_irq()
rather than spin_lock_irqsave().  Convert this, and the divisor
setting functions to use spin_lock_irqsave().
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 65f2e753
...@@ -93,9 +93,11 @@ static struct bus_type mcp_bus_type = { ...@@ -93,9 +93,11 @@ static struct bus_type mcp_bus_type = {
*/ */
void mcp_set_telecom_divisor(struct mcp *mcp, unsigned int div) void mcp_set_telecom_divisor(struct mcp *mcp, unsigned int div)
{ {
spin_lock_irq(&mcp->lock); unsigned long flags;
spin_lock_irqsave(&mcp->lock, flags);
mcp->ops->set_telecom_divisor(mcp, div); mcp->ops->set_telecom_divisor(mcp, div);
spin_unlock_irq(&mcp->lock); spin_unlock_irqrestore(&mcp->lock, flags);
} }
EXPORT_SYMBOL(mcp_set_telecom_divisor); EXPORT_SYMBOL(mcp_set_telecom_divisor);
...@@ -108,9 +110,11 @@ EXPORT_SYMBOL(mcp_set_telecom_divisor); ...@@ -108,9 +110,11 @@ EXPORT_SYMBOL(mcp_set_telecom_divisor);
*/ */
void mcp_set_audio_divisor(struct mcp *mcp, unsigned int div) void mcp_set_audio_divisor(struct mcp *mcp, unsigned int div)
{ {
spin_lock_irq(&mcp->lock); unsigned long flags;
spin_lock_irqsave(&mcp->lock, flags);
mcp->ops->set_audio_divisor(mcp, div); mcp->ops->set_audio_divisor(mcp, div);
spin_unlock_irq(&mcp->lock); spin_unlock_irqrestore(&mcp->lock, flags);
} }
EXPORT_SYMBOL(mcp_set_audio_divisor); EXPORT_SYMBOL(mcp_set_audio_divisor);
...@@ -163,10 +167,11 @@ EXPORT_SYMBOL(mcp_reg_read); ...@@ -163,10 +167,11 @@ EXPORT_SYMBOL(mcp_reg_read);
*/ */
void mcp_enable(struct mcp *mcp) void mcp_enable(struct mcp *mcp)
{ {
spin_lock_irq(&mcp->lock); unsigned long flags;
spin_lock_irqsave(&mcp->lock, flags);
if (mcp->use_count++ == 0) if (mcp->use_count++ == 0)
mcp->ops->enable(mcp); mcp->ops->enable(mcp);
spin_unlock_irq(&mcp->lock); spin_unlock_irqrestore(&mcp->lock, flags);
} }
EXPORT_SYMBOL(mcp_enable); EXPORT_SYMBOL(mcp_enable);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册