[PATCH] pcmcia: fix multiple insertion of multifunction cards
authorDominik Brodowski <linux@dominikbrodowski.net>
Mon, 1 Aug 2005 12:55:51 +0000 (14:55 +0200)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 1 Aug 2005 17:03:56 +0000 (10:03 -0700)
The ordering of setting and clearing device_add_pending went wrong on some
occasions, causing multifunction cards only to be handled correctly on the
first insertion, not on subsequent ones.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/pcmcia/ds.c

index d63f22a5bf7e84bafea7132b0305efe8485042ef..43da2e92d50fe67fd633021de9abef67b130bc51 100644 (file)
@@ -589,8 +589,8 @@ static void pcmcia_delayed_add_pseudo_device(void *data)
 static inline void pcmcia_add_pseudo_device(struct pcmcia_socket *s)
 {
        if (!s->pcmcia_state.device_add_pending) {
-               schedule_work(&s->device_add);
                s->pcmcia_state.device_add_pending = 1;
+               schedule_work(&s->device_add);
        }
        return;
 }