- patches.fixes/patch-2.6.11-rc1: 2.6.11-rc1.
[linux-flexiantxendom0-3.2.10.git] / drivers / net / wireless / wl3501_cs.c
index ffd8d7d..1433e5a 100644 (file)
@@ -79,7 +79,7 @@
 #define PCMCIA_DEBUG 0
 #ifdef PCMCIA_DEBUG
 static int pc_debug = PCMCIA_DEBUG;
-MODULE_PARM(pc_debug, "i");
+module_param(pc_debug, int, 0);
 #define dprintk(n, format, args...) \
        { if (pc_debug > (n)) \
                printk(KERN_INFO "%s: " format "\n", __FUNCTION__ , ##args); }
@@ -97,12 +97,6 @@ MODULE_PARM(pc_debug, "i");
 #define WL3501_RESUME  0
 #define WL3501_SUSPEND 1
 
-/* Parameters that can be set with 'insmod' */
-/* Bit map of interrupts to choose from */
-/* This means pick from 15, 14, 12, 11, 10, 9, 7, 5, 4, and 3 */
-static unsigned long wl3501_irq_mask = 0xdeb8;
-static int wl3501_irq_list[4] = { -1 };
-
 /*
  * The event() function is this driver's Card Services event handler.  It will
  * be called by Card Services when an appropriate card status event is
@@ -1967,7 +1961,7 @@ static dev_link_t *wl3501_attach(void)
        client_reg_t client_reg;
        dev_link_t *link;
        struct net_device *dev;
-       int ret, i;
+       int ret;
 
        /* Initialize the dev_link_t structure */
        link = kmalloc(sizeof(*link), GFP_KERNEL);
@@ -1982,11 +1976,7 @@ static dev_link_t *wl3501_attach(void)
 
        /* Interrupt setup */
        link->irq.Attributes    = IRQ_TYPE_EXCLUSIVE | IRQ_HANDLE_PRESENT;
-       link->irq.IRQInfo1      = IRQ_INFO2_VALID | IRQ_LEVEL_ID;
-       link->irq.IRQInfo2      = wl3501_irq_mask;
-       if (wl3501_irq_list[0] != -1)
-               for (i = 0; i < 4; i++)
-                       link->irq.IRQInfo2 |= 1 << wl3501_irq_list[i];
+       link->irq.IRQInfo1      = IRQ_LEVEL_ID;
        link->irq.Handler = wl3501_interrupt;
 
        /* General socket configuration */
@@ -2015,7 +2005,6 @@ static dev_link_t *wl3501_attach(void)
        link->next               = wl3501_dev_list;
        wl3501_dev_list          = link;
        client_reg.dev_info      = &wl3501_dev_info;
-       client_reg.Attributes    = INFO_IO_CLIENT | INFO_CARD_SHARE;
        client_reg.EventMask     = CS_EVENT_CARD_INSERTION |
                                   CS_EVENT_RESET_PHYSICAL |
                                   CS_EVENT_CARD_RESET |
@@ -2105,6 +2094,7 @@ static void wl3501_config(dev_link_t *link)
 
        dev->irq = link->irq.AssignedIRQ;
        dev->base_addr = link->io.BasePort1;
+       SET_NETDEV_DEV(dev, &handle_to_dev(handle));
        if (register_netdev(dev)) {
                printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n");
                goto failed;
@@ -2267,20 +2257,12 @@ static void __exit wl3501_exit_module(void)
 {
        dprintk(0, ": unloading");
        pcmcia_unregister_driver(&wl3501_driver);
-       while (wl3501_dev_list) {
-               /* Mark the device as non-existing to minimize calls to card */
-               wl3501_dev_list->state &= ~DEV_PRESENT;
-               if (wl3501_dev_list->state & DEV_CONFIG)
-                       wl3501_release(wl3501_dev_list);
-               wl3501_detach(wl3501_dev_list);
-       }
+       BUG_ON(wl3501_dev_list != NULL);
 }
 
 module_init(wl3501_init_module);
 module_exit(wl3501_exit_module);
 
-MODULE_PARM(wl3501_irq_mask, "i");
-MODULE_PARM(wl3501_irq_list, "1-4i");
 MODULE_AUTHOR("Fox Chen <mhchen@golf.ccl.itri.org.tw>, "
              "Arnaldo Carvalho de Melo <acme@conectiva.com.br>,"
              "Gustavo Niemeyer <niemeyer@conectiva.com>");