diff options
-rw-r--r-- | drivers/mfd/mcp-core.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/mfd/mcp-core.c b/drivers/mfd/mcp-core.c index 84815f9ef636..86cc3f7841cd 100644 --- a/drivers/mfd/mcp-core.c +++ b/drivers/mfd/mcp-core.c | |||
@@ -93,9 +93,11 @@ static struct bus_type mcp_bus_type = { | |||
93 | */ | 93 | */ |
94 | void mcp_set_telecom_divisor(struct mcp *mcp, unsigned int div) | 94 | void mcp_set_telecom_divisor(struct mcp *mcp, unsigned int div) |
95 | { | 95 | { |
96 | spin_lock_irq(&mcp->lock); | 96 | unsigned long flags; |
97 | |||
98 | spin_lock_irqsave(&mcp->lock, flags); | ||
97 | mcp->ops->set_telecom_divisor(mcp, div); | 99 | mcp->ops->set_telecom_divisor(mcp, div); |
98 | spin_unlock_irq(&mcp->lock); | 100 | spin_unlock_irqrestore(&mcp->lock, flags); |
99 | } | 101 | } |
100 | EXPORT_SYMBOL(mcp_set_telecom_divisor); | 102 | EXPORT_SYMBOL(mcp_set_telecom_divisor); |
101 | 103 | ||
@@ -108,9 +110,11 @@ EXPORT_SYMBOL(mcp_set_telecom_divisor); | |||
108 | */ | 110 | */ |
109 | void mcp_set_audio_divisor(struct mcp *mcp, unsigned int div) | 111 | void mcp_set_audio_divisor(struct mcp *mcp, unsigned int div) |
110 | { | 112 | { |
111 | spin_lock_irq(&mcp->lock); | 113 | unsigned long flags; |
114 | |||
115 | spin_lock_irqsave(&mcp->lock, flags); | ||
112 | mcp->ops->set_audio_divisor(mcp, div); | 116 | mcp->ops->set_audio_divisor(mcp, div); |
113 | spin_unlock_irq(&mcp->lock); | 117 | spin_unlock_irqrestore(&mcp->lock, flags); |
114 | } | 118 | } |
115 | EXPORT_SYMBOL(mcp_set_audio_divisor); | 119 | EXPORT_SYMBOL(mcp_set_audio_divisor); |
116 | 120 | ||
@@ -163,10 +167,11 @@ EXPORT_SYMBOL(mcp_reg_read); | |||
163 | */ | 167 | */ |
164 | void mcp_enable(struct mcp *mcp) | 168 | void mcp_enable(struct mcp *mcp) |
165 | { | 169 | { |
166 | spin_lock_irq(&mcp->lock); | 170 | unsigned long flags; |
171 | spin_lock_irqsave(&mcp->lock, flags); | ||
167 | if (mcp->use_count++ == 0) | 172 | if (mcp->use_count++ == 0) |
168 | mcp->ops->enable(mcp); | 173 | mcp->ops->enable(mcp); |
169 | spin_unlock_irq(&mcp->lock); | 174 | spin_unlock_irqrestore(&mcp->lock, flags); |
170 | } | 175 | } |
171 | EXPORT_SYMBOL(mcp_enable); | 176 | EXPORT_SYMBOL(mcp_enable); |
172 | 177 | ||