From: Christoph Hellwig The _config function called just before clear DEV_CONFIG, and DEV_STALE_LINK isn't set anywhere else. This is a copy & paste thing found in all old pcmcia drivers. The patch has been sent to the isdn list ages ago but I didn't get any response. Signed-off-by: Andrew Morton --- 25-akpm/drivers/isdn/hisax/elsa_cs.c | 17 ----------------- 25-akpm/drivers/isdn/hisax/teles_cs.c | 17 ----------------- 2 files changed, 34 deletions(-) diff -puN drivers/isdn/hisax/elsa_cs.c~remove-dead-isdn-pcmcia-code drivers/isdn/hisax/elsa_cs.c --- 25/drivers/isdn/hisax/elsa_cs.c~remove-dead-isdn-pcmcia-code 2004-07-05 04:03:49.583516696 -0700 +++ 25-akpm/drivers/isdn/hisax/elsa_cs.c 2004-07-05 04:03:49.589515784 -0700 @@ -271,19 +271,6 @@ static void elsa_cs_detach(dev_link_t *l if (link->state & DEV_CONFIG) elsa_cs_release(link); - /* - If the device is currently configured and active, we won't - actually delete it yet. Instead, it is marked so that when - the release() function is called, that will trigger a proper - detach(). - */ - if (link->state & DEV_CONFIG) { - DEBUG(0, "elsa_cs: detach postponed, '%s' " - "still locked\n", link->dev->dev_name); - link->state |= DEV_STALE_LINK; - return; - } - /* Break the link with Card Services */ if (link->handle) { ret = pcmcia_deregister_client(link->handle); @@ -480,10 +467,6 @@ static void elsa_cs_release(dev_link_t * pcmcia_release_io(link->handle, &link->io); pcmcia_release_irq(link->handle, &link->irq); link->state &= ~DEV_CONFIG; - - if (link->state & DEV_STALE_LINK) - elsa_cs_detach(link); - } /* elsa_cs_release */ /*====================================================================== diff -puN drivers/isdn/hisax/teles_cs.c~remove-dead-isdn-pcmcia-code drivers/isdn/hisax/teles_cs.c --- 25/drivers/isdn/hisax/teles_cs.c~remove-dead-isdn-pcmcia-code 2004-07-05 04:03:49.584516544 -0700 +++ 25-akpm/drivers/isdn/hisax/teles_cs.c 2004-07-05 04:03:49.590515632 -0700 @@ -252,19 +252,6 @@ static void teles_detach(dev_link_t *lin if (link->state & DEV_CONFIG) teles_cs_release(link); - /* - If the device is currently configured and active, we won't - actually delete it yet. Instead, it is marked so that when - the release() function is called, that will trigger a proper - detach(). - */ - if (link->state & DEV_CONFIG) { - DEBUG(0, "teles_cs: detach postponed, '%s' " - "still locked\n", link->dev->dev_name); - link->state |= DEV_STALE_LINK; - return; - } - /* Break the link with Card Services */ if (link->handle) { ret = pcmcia_deregister_client(link->handle); @@ -461,10 +448,6 @@ static void teles_cs_release(dev_link_t pcmcia_release_io(link->handle, &link->io); pcmcia_release_irq(link->handle, &link->irq); link->state &= ~DEV_CONFIG; - - if (link->state & DEV_STALE_LINK) - teles_detach(link); - } /* teles_cs_release */ /*====================================================================== _