diff options
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/db1xxx_ss.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c index 2d48196a48c..0f4cc3f0002 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) | |||
146 | static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock) | 146 | static 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,30 +161,23 @@ 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) |
170 | local_irq_restore(flags); | ||
171 | goto out1; | 167 | goto out1; |
172 | } | ||
173 | 168 | ||
174 | ret = request_irq(sock->eject_irq, db1200_pcmcia_cdirq, | 169 | ret = request_irq(sock->eject_irq, db1200_pcmcia_cdirq, |
175 | IRQF_DISABLED, "pcmcia_eject", sock); | 170 | IRQF_DISABLED, "pcmcia_eject", sock); |
176 | if (ret) { | 171 | if (ret) { |
177 | free_irq(sock->insert_irq, sock); | 172 | free_irq(sock->insert_irq, sock); |
178 | local_irq_restore(flags); | ||
179 | goto out1; | 173 | goto out1; |
180 | } | 174 | } |
181 | 175 | ||
182 | /* disable the currently active one */ | 176 | /* enable the currently silent one */ |
183 | if (db1200_card_inserted(sock)) | 177 | if (db1200_card_inserted(sock)) |
184 | disable_irq_nosync(sock->insert_irq); | 178 | enable_irq(sock->eject_irq); |
185 | else | 179 | else |
186 | disable_irq_nosync(sock->eject_irq); | 180 | enable_irq(sock->insert_irq); |
187 | |||
188 | local_irq_restore(flags); | ||
189 | } else { | 181 | } else { |
190 | /* all other (older) Db1x00 boards use a GPIO to show | 182 | /* all other (older) Db1x00 boards use a GPIO to show |
191 | * card detection status: use both-edge triggers. | 183 | * card detection status: use both-edge triggers. |