MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / drivers / usb / net / Zydas / zdpci_hotplug.c
blob941b97bb3689e6e7c8168ca3a028abc5a289be0e
2 #include <linux/version.h>
4 #ifdef MODVERSIONS
5 #include <linux/modversions.h>
6 #endif
7 #include <linux/module.h>
9 #include <linux/pci.h>
11 #include "zd1205.h"
12 #include "zddebug.h"
13 #include "zdpci_hotplug.h"
14 #include "zdversion.h"
17 /******************************************************************************
18 Global variable definition section
19 ******************************************************************************/
20 MODULE_AUTHOR("Yarco Yang");
21 MODULE_DESCRIPTION("ZyDAS 802.11 Wireless LAN adapter");
22 MODULE_LICENSE("GPL");
24 extern struct net_device *g_dev;
26 static struct pci_device_id zd1205_id_table[] =
28 {0x167b, 0x2102, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ZD_1202},
29 {0x167b, 0x2100, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ZD_1202},
30 {0x167b, 0x2105, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ZD_1205},
31 {0,} /* terminate list */
35 // register the device with the Hotplug facilities of the kernel
36 MODULE_DEVICE_TABLE(pci, zd1205_id_table);
39 struct pci_driver zd1205_driver = {
40 .name = "zd1205", // Driver name
41 .id_table = zd1205_id_table, // id table
42 .probe = zd1205_found1, // probe function
43 .remove = zd1205_remove1, // remove function
46 /******************************************************************************
47 Module initialization functions
48 ******************************************************************************/
51 int init_module( void )
53 printk(KERN_NOTICE "%s - version %s\n", DRIVER_NAME, VERSIONID);
55 if (pci_register_driver(&zd1205_driver) <= 0)
57 printk(KERN_ERR "%s: No devices found, driver not "
58 "installed.\n", DRIVER_NAME);
59 pci_unregister_driver(&zd1205_driver);
60 return -ENODEV;
63 return 0;
67 void cleanup_module( void )
69 pci_unregister_driver(&zd1205_driver);
71 printk(KERN_NOTICE "Unloaded %s \n", DRIVER_NAME);