vserver 1.9.5.x5
[linux-2.6.git] / drivers / isdn / hisax / elsa_cs.c
index f957e57..bfc0132 100644 (file)
@@ -69,7 +69,7 @@ MODULE_LICENSE("Dual MPL/GPL");
 
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args);
 static char *version =
 "elsa_cs.c $Revision: 1.2.2.4 $ $Date: 2004/01/25 15:07:06 $ (K.Lichtenwalder)";
@@ -81,18 +81,8 @@ static char *version =
 
 /* Parameters that can be set with 'insmod' */
 
-/* Bit map of interrupts to choose from, the old way */
-/* This means pick from 15, 14, 12, 11, 10, 9, 7, 5, 4, 3 */
-static u_long irq_mask = 0xdeb8;
-
-/* Newer, simpler way of listing specific interrupts */
-static int irq_list[4] = { -1 };
-
-MODULE_PARM(irq_mask, "i");
-MODULE_PARM(irq_list, "1-4i");
-
 static int protocol = 2;        /* EURO-ISDN Default */
-MODULE_PARM(protocol, "i");
+module_param(protocol, int, 0);
 
 /*====================================================================*/
 
@@ -187,7 +177,7 @@ static dev_link_t *elsa_cs_attach(void)
     client_reg_t client_reg;
     dev_link_t *link;
     local_info_t *local;
-    int ret, i;
+    int ret;
 
     DEBUG(0, "elsa_cs_attach()\n");
 
@@ -200,12 +190,7 @@ static dev_link_t *elsa_cs_attach(void)
 
     /* Interrupt setup */
     link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
-    link->irq.IRQInfo1 = IRQ_INFO2_VALID|IRQ_LEVEL_ID|IRQ_SHARE_ID;
-    if (irq_list[0] == -1)
-        link->irq.IRQInfo2 = irq_mask;
-    else
-        for (i = 0; i < 4; i++)
-            link->irq.IRQInfo2 |= 1 << irq_list[i];
+    link->irq.IRQInfo1 = IRQ_LEVEL_ID|IRQ_SHARE_ID;
     link->irq.Handler = NULL;
 
     /*
@@ -227,7 +212,6 @@ static dev_link_t *elsa_cs_attach(void)
     link->next = dev_list;
     dev_list = link;
     client_reg.dev_info = &dev_info;
-    client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
     client_reg.EventMask =
         CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
         CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
@@ -271,19 +255,6 @@ static void elsa_cs_detach(dev_link_t *link)
     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 +451,6 @@ static void elsa_cs_release(dev_link_t *link)
     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 */
 
 /*======================================================================
@@ -558,10 +525,7 @@ static int __init init_elsa_cs(void)
 static void __exit exit_elsa_cs(void)
 {
        pcmcia_unregister_driver(&elsa_cs_driver);
-
-       /* XXX: this really needs to move into generic code.. */
-       while (dev_list != NULL)
-               elsa_cs_detach(dev_list);
+       BUG_ON(dev_list != NULL);
 }
 
 module_init(init_elsa_cs);