aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/db1xxx_ss.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/db1xxx_ss.c')
-rw-r--r--drivers/pcmcia/db1xxx_ss.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c
index 6206408e196c..0f4cc3f00028 100644
--- a/drivers/pcmcia/db1xxx_ss.c
+++ b/drivers/pcmcia/db1xxx_ss.c
@@ -146,7 +146,6 @@ static irqreturn_t db1200_pcmcia_cdirq(int irq, void *data)
146static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock) 146static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock)
147{ 147{
148 int ret; 148 int ret;
149 unsigned long flags;
150 149
151 if (sock->stschg_irq != -1) { 150 if (sock->stschg_irq != -1) {
152 ret = request_irq(sock->stschg_irq, db1000_pcmcia_stschgirq, 151 ret = request_irq(sock->stschg_irq, db1000_pcmcia_stschgirq,
@@ -162,8 +161,6 @@ static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock)
162 * active one disabled. 161 * active one disabled.
163 */ 162 */
164 if (sock->board_type == BOARD_TYPE_DB1200) { 163 if (sock->board_type == BOARD_TYPE_DB1200) {
165 local_irq_save(flags);
166
167 ret = request_irq(sock->insert_irq, db1200_pcmcia_cdirq, 164 ret = request_irq(sock->insert_irq, db1200_pcmcia_cdirq,
168 IRQF_DISABLED, "pcmcia_insert", sock); 165 IRQF_DISABLED, "pcmcia_insert", sock);
169 if (ret) 166 if (ret)
@@ -173,17 +170,14 @@ static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock)
173 IRQF_DISABLED, "pcmcia_eject", sock); 170 IRQF_DISABLED, "pcmcia_eject", sock);
174 if (ret) { 171 if (ret) {
175 free_irq(sock->insert_irq, sock); 172 free_irq(sock->insert_irq, sock);
176 local_irq_restore(flags);
177 goto out1; 173 goto out1;
178 } 174 }
179 175
180 /* disable the currently active one */ 176 /* enable the currently silent one */
181 if (db1200_card_inserted(sock)) 177 if (db1200_card_inserted(sock))
182 disable_irq_nosync(sock->insert_irq); 178 enable_irq(sock->eject_irq);
183 else 179 else
184 disable_irq_nosync(sock->eject_irq); 180 enable_irq(sock->insert_irq);
185
186 local_irq_restore(flags);
187 } else { 181 } else {
188 /* all other (older) Db1x00 boards use a GPIO to show 182 /* all other (older) Db1x00 boards use a GPIO to show
189 * card detection status: use both-edge triggers. 183 * card detection status: use both-edge triggers.