patch-2.4.0-test12 linux/drivers/isdn/avmb1/b1pci.c
Next file: linux/drivers/isdn/avmb1/b1pcmcia.c
Previous file: linux/drivers/isdn/avmb1/b1isa.c
Back to the patch index
Back to the overall index
- Lines: 103
- Date:
Tue Nov 28 21:44:41 2000
- Orig file:
v2.4.0-test11/linux/drivers/isdn/avmb1/b1pci.c
- Orig date:
Sun Nov 19 18:44:08 2000
diff -u --recursive --new-file v2.4.0-test11/linux/drivers/isdn/avmb1/b1pci.c linux/drivers/isdn/avmb1/b1pci.c
@@ -1,11 +1,30 @@
/*
- * $Id: b1pci.c,v 1.27 2000/08/08 09:24:19 calle Exp $
+ * $Id: b1pci.c,v 1.29.6.1 2000/11/28 12:02:45 kai Exp $
*
* Module for AVM B1 PCI-card.
*
* (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de)
*
* $Log: b1pci.c,v $
+ * Revision 1.29.6.1 2000/11/28 12:02:45 kai
+ * MODULE_DEVICE_TABLE for 2.4
+ *
+ * Revision 1.29.2.2 2000/11/26 17:47:53 kai
+ * added PCI_DEV_TABLE for 2.4
+ *
+ * Revision 1.29.2.1 2000/11/26 17:14:19 kai
+ * fix device ids
+ * also needs patches to include/linux/pci_ids.h
+ *
+ * Revision 1.29 2000/11/23 20:45:14 kai
+ * fixed module_init/exit stuff
+ * Note: compiled-in kernel doesn't work pre 2.2.18 anymore.
+ *
+ * Revision 1.28 2000/11/01 14:05:02 calle
+ * - use module_init/module_exit from linux/init.h.
+ * - all static struct variables are initialized with "membername:" now.
+ * - avm_cs.c, let it work with newer pcmcia-cs.
+ *
* Revision 1.27 2000/08/08 09:24:19 calle
* calls to pci_enable_device surounded by #ifndef COMPAT_HAS_2_2_PCI
*
@@ -94,25 +113,22 @@
#include <linux/pci.h>
#include <linux/capi.h>
#include <asm/io.h>
+#include <linux/init.h>
#include "capicmd.h"
#include "capiutil.h"
#include "capilli.h"
#include "avmcard.h"
-static char *revision = "$Revision: 1.27 $";
+static char *revision = "$Revision: 1.29.6.1 $";
/* ------------------------------------------------------------- */
-#ifndef PCI_VENDOR_ID_AVM
-#define PCI_VENDOR_ID_AVM 0x1244
-#endif
-
-#ifndef PCI_DEVICE_ID_AVM_B1
-#define PCI_DEVICE_ID_AVM_B1 0x700
-#endif
-
-/* ------------------------------------------------------------- */
+static struct pci_device_id b1pci_pci_tbl[] __initdata = {
+ { PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_B1, PCI_ANY_ID, PCI_ANY_ID },
+ { } /* Terminating entry */
+};
+MODULE_DEVICE_TABLE(pci, b1pci_pci_tbl);
MODULE_AUTHOR("Carsten Paeth <calle@calle.in-berlin.de>");
/* ------------------------------------------------------------- */
@@ -481,11 +497,6 @@
#endif /* CONFIG_ISDN_DRV_AVMB1_B1PCIV4 */
-#ifdef MODULE
-#define b1pci_init init_module
-void cleanup_module(void);
-#endif
-
static int ncards = 0;
static int add_card(struct pci_dev *dev)
@@ -548,7 +559,7 @@
return retval;
}
-int b1pci_init(void)
+static int __init b1pci_init(void)
{
struct capi_driver *driver = &b1pci_driver;
#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4
@@ -640,12 +651,13 @@
#endif
}
-#ifdef MODULE
-void cleanup_module(void)
+static void __exit b1pci_exit(void)
{
detach_capi_driver(&b1pci_driver);
#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4
detach_capi_driver(&b1pciv4_driver);
#endif
}
-#endif
+
+module_init(b1pci_init);
+module_exit(b1pci_exit);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)