diff options
author | Manuel Lauss <manuel.lauss@googlemail.com> | 2010-04-21 11:41:59 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-04-30 15:52:43 -0400 |
commit | 0000a5390184af1459e82506fcfa7db96f3e6d33 (patch) | |
tree | a21be05f506bbee603e2a280d126204ce7dbf3d4 /drivers/pcmcia | |
parent | 0dfeecacd8e4405209f217944818b90016bb4a9d (diff) |
MIPS: DB1200: PCMCIA card detection must not be auto-enabled.
Same issues as SD card detection: One of both is always triggering and the
handlers take care to shut it up and enable the other. To avoid messages
about "unbalanced interrupt enable/disable" they must not be automatically
enabled when initally requested.
This was not an issue with the db1200_defconfig due to fortunate timings;
on a build without network chip support the warnings appear.
Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
To: Linux-MIPS <linux-mips@linux-mips.org>
Patchwork: http://patchwork.linux-mips.org/patch/1133/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
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. |