]> err.no Git - linux-2.6/blobdiff - drivers/net/wireless/airo_cs.c
Merge by hand (conflicts between pending drivers and kfree cleanups)
[linux-2.6] / drivers / net / wireless / airo_cs.c
index f10a9523034a650c9a43c9b2c330e89478db449d..96ed8da8661d2aba1afe78e531812c32d2908b83 100644 (file)
@@ -33,7 +33,6 @@
 #include <linux/timer.h>
 #include <linux/netdevice.h>
 
-#include <pcmcia/version.h>
 #include <pcmcia/cs_types.h>
 #include <pcmcia/cs.h>
 #include <pcmcia/cistpl.h>
@@ -43,6 +42,8 @@
 #include <asm/io.h>
 #include <asm/system.h>
 
+#include "airo.h"
+
 /*
    All the PCMCIA modules use PCMCIA_DEBUG to control debugging.  If
    you do not define PCMCIA_DEBUG at all, all the debug code will be
@@ -79,10 +80,6 @@ MODULE_SUPPORTED_DEVICE("Aironet 4500, 4800 and Cisco 340 PCMCIA cards");
    event handler. 
 */
 
-struct net_device *init_airo_card( int, int, int, struct device * );
-void stop_airo_card( struct net_device *, int );
-int reset_airo_card( struct net_device * );
-
 static void airo_config(dev_link_t *link);
 static void airo_release(dev_link_t *link);
 static int airo_event(event_t event, int priority,
@@ -210,11 +207,6 @@ static dev_link_t *airo_attach(void)
        link->next = dev_list;
        dev_list = link;
        client_reg.dev_info = &dev_info;
-       client_reg.EventMask =
-               CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
-               CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
-               CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
-       client_reg.event_handler = &airo_event;
        client_reg.Version = 0x0210;
        client_reg.event_callback_args.client_data = link;
        ret = pcmcia_register_client(&link->handle, &client_reg);
@@ -264,9 +256,7 @@ static void airo_detach(dev_link_t *link)
        
        /* Unlink device structure, free pieces */
        *linkp = link->next;
-       if (link->priv) {
-               kfree(link->priv);
-       }
+       kfree(link->priv);
        kfree(link);
        
 } /* airo_detach */
@@ -574,6 +564,7 @@ static struct pcmcia_driver airo_driver = {
                .name   = "airo_cs",
        },
        .attach         = airo_attach,
+       .event          = airo_event,
        .detach         = airo_detach,
        .id_table       = airo_ids,
 };