Staging: comedi: Remove COMEDI_INITCLEANUP macro
authorArun Thomas <arun.thomas@gmail.com>
Sun, 6 Jun 2010 20:23:30 +0000 (22:23 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 17 Jun 2010 20:47:00 +0000 (13:47 -0700)
Move the init/exit routines to the respective C source files
instead of calling COMEDI_INITCLEANUP

Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
59 files changed:
drivers/staging/comedi/comedidev.h
drivers/staging/comedi/drivers/8255.c
drivers/staging/comedi/drivers/acl7225b.c
drivers/staging/comedi/drivers/adq12b.c
drivers/staging/comedi/drivers/aio_aio12_8.c
drivers/staging/comedi/drivers/aio_iiro_16.c
drivers/staging/comedi/drivers/amplc_dio200.c
drivers/staging/comedi/drivers/amplc_pc236.c
drivers/staging/comedi/drivers/amplc_pc263.c
drivers/staging/comedi/drivers/c6xdigio.c
drivers/staging/comedi/drivers/cb_das16_cs.c
drivers/staging/comedi/drivers/comedi_parport.c
drivers/staging/comedi/drivers/comedi_test.c
drivers/staging/comedi/drivers/das08.c
drivers/staging/comedi/drivers/das16.c
drivers/staging/comedi/drivers/das16m1.c
drivers/staging/comedi/drivers/das1800.c
drivers/staging/comedi/drivers/das6402.c
drivers/staging/comedi/drivers/das800.c
drivers/staging/comedi/drivers/dmm32at.c
drivers/staging/comedi/drivers/dt2801.c
drivers/staging/comedi/drivers/dt2811.c
drivers/staging/comedi/drivers/dt2814.c
drivers/staging/comedi/drivers/dt2815.c
drivers/staging/comedi/drivers/dt2817.c
drivers/staging/comedi/drivers/dt282x.c
drivers/staging/comedi/drivers/fl512.c
drivers/staging/comedi/drivers/icp_multi.c
drivers/staging/comedi/drivers/ii_pci20kc.c
drivers/staging/comedi/drivers/mpc624.c
drivers/staging/comedi/drivers/mpc8260cpm.c
drivers/staging/comedi/drivers/multiq3.c
drivers/staging/comedi/drivers/ni_at_a2150.c
drivers/staging/comedi/drivers/ni_at_ao.c
drivers/staging/comedi/drivers/ni_atmio.c
drivers/staging/comedi/drivers/ni_atmio16d.c
drivers/staging/comedi/drivers/ni_labpc.c
drivers/staging/comedi/drivers/pcl711.c
drivers/staging/comedi/drivers/pcl724.c
drivers/staging/comedi/drivers/pcl725.c
drivers/staging/comedi/drivers/pcl726.c
drivers/staging/comedi/drivers/pcl730.c
drivers/staging/comedi/drivers/pcl812.c
drivers/staging/comedi/drivers/pcl816.c
drivers/staging/comedi/drivers/pcl818.c
drivers/staging/comedi/drivers/pcm3724.c
drivers/staging/comedi/drivers/pcm3730.c
drivers/staging/comedi/drivers/pcmad.c
drivers/staging/comedi/drivers/pcmda12.c
drivers/staging/comedi/drivers/pcmmio.c
drivers/staging/comedi/drivers/pcmuio.c
drivers/staging/comedi/drivers/poc.c
drivers/staging/comedi/drivers/rti800.c
drivers/staging/comedi/drivers/rti802.c
drivers/staging/comedi/drivers/s526.c
drivers/staging/comedi/drivers/serial2002.c
drivers/staging/comedi/drivers/skel.c
drivers/staging/comedi/drivers/ssv_dnp.c
drivers/staging/comedi/drivers/unioxx5.c

index 8daff9464fb47be64ee921f2e230ffb51ad7ddcb..8e0106520c2faf13d3adeecfb9172f71dc6f81f6 100644 (file)
        COMEDI_MINORVERSION, COMEDI_MICROVERSION)
 #define COMEDI_RELEASE VERSION
 
-#define COMEDI_INITCLEANUP_NOMODULE(x)                                 \
-       static int __init x ## _init_module(void)                       \
-               {return comedi_driver_register(&(x)); }                 \
-       static void __exit x ## _cleanup_module(void)                   \
-               {comedi_driver_unregister(&(x)); }                      \
-       module_init(x ## _init_module);                                 \
-       module_exit(x ## _cleanup_module);
-
-#define COMEDI_INITCLEANUP(x)                                          \
-       COMEDI_INITCLEANUP_NOMODULE(x)
-
 #define COMEDI_PCI_INITCLEANUP_NOMODULE(comedi_driver, pci_id_table) \
        static int __devinit comedi_driver ## _pci_probe(struct pci_dev *dev, \
                const struct pci_device_id *ent) \
index 0f83090488d522b09e826d49ffa12d082c95e3ef..95049a8d3b38721e0bb6d71f56188c1a01593e69 100644 (file)
@@ -117,7 +117,18 @@ static struct comedi_driver driver_8255 = {
        .detach = dev_8255_detach,
 };
 
-COMEDI_INITCLEANUP(driver_8255);
+static int __init driver_8255_init_module(void)
+{
+       return comedi_driver_register(&driver_8255);
+}
+
+static void __exit driver_8255_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_8255);
+}
+
+module_init(driver_8255_init_module);
+module_exit(driver_8255_cleanup_module);
 
 static void do_config(struct comedi_device *dev, struct comedi_subdevice *s);
 
index 1d0a8ea7795027027a2d271fa78bdda3c9b0c0a2..9def2250bb8002ab84460649bc854069f23ce3f0 100644 (file)
@@ -49,7 +49,18 @@ static struct comedi_driver driver_acl7225b = {
        .offset = sizeof(struct boardtype),
 };
 
-COMEDI_INITCLEANUP(driver_acl7225b);
+static int __init driver_acl7225b_init_module(void)
+{
+       return comedi_driver_register(&driver_acl7225b);
+}
+
+static void __exit driver_acl7225b_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_acl7225b);
+}
+
+module_init(driver_acl7225b_init_module);
+module_exit(driver_acl7225b_cleanup_module);
 
 static int acl7225b_do_insn(struct comedi_device *dev,
                            struct comedi_subdevice *s,
index f318a01dd57a61b0f8a3fe885967bec70b545dec..4b470000b69c755eab0f03c2faa1fbd1d92e43fd 100644 (file)
@@ -402,7 +402,18 @@ static int adq12b_do_insn_bits(struct comedi_device *dev,
  * A convenient macro that defines init_module() and cleanup_module(),
  * as necessary.
  */
-COMEDI_INITCLEANUP(driver_adq12b);
+static int __init driver_adq12b_init_module(void)
+{
+       return comedi_driver_register(&driver_adq12b);
+}
+
+static void __exit driver_adq12b_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_adq12b);
+}
+
+module_init(driver_adq12b_init_module);
+module_exit(driver_adq12b_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index dc00c4b4a155b9f38f82112fa54f9ad46b27ef33..1728cc013d16ef602188814339b310a1b8024cb0 100644 (file)
@@ -227,7 +227,18 @@ static struct comedi_driver driver_aio_aio12_8 = {
        .offset = sizeof(struct aio12_8_boardtype),
 };
 
-COMEDI_INITCLEANUP(driver_aio_aio12_8);
+static int __init driver_aio_aio12_8_init_module(void)
+{
+       return comedi_driver_register(&driver_aio_aio12_8);
+}
+
+static void __exit driver_aio_aio12_8_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_aio_aio12_8);
+}
+
+module_init(driver_aio_aio12_8_init_module);
+module_exit(driver_aio_aio12_8_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index ad5e75babdd19f06bda1dbaad6f54d3713ec8cab..487599531fed7d1f4cd9dd09fdb7d7bc82d15087 100644 (file)
@@ -184,7 +184,18 @@ static int aio_iiro_16_dio_insn_bits_read(struct comedi_device *dev,
        return 2;
 }
 
-COMEDI_INITCLEANUP(driver_aio_iiro_16);
+static int __init driver_aio_iiro_16_init_module(void)
+{
+       return comedi_driver_register(&driver_aio_iiro_16);
+}
+
+static void __exit driver_aio_iiro_16_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_aio_iiro_16);
+}
+
+module_init(driver_aio_iiro_16_init_module);
+module_exit(driver_aio_iiro_16_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index 9a60c214373ecda679494a869b46f53437d33c32..674cf1df7e2c464e67351df0579e0da68dd8a807 100644 (file)
@@ -496,7 +496,18 @@ static struct comedi_driver driver_amplc_dio200 = {
 #ifdef CONFIG_COMEDI_PCI
 COMEDI_PCI_INITCLEANUP(driver_amplc_dio200, dio200_pci_table);
 #else
-COMEDI_INITCLEANUP(driver_amplc_dio200);
+static int __init driver_amplc_dio200_init_module(void)
+{
+       return comedi_driver_register(&driver_amplc_dio200);
+}
+
+static void __exit driver_amplc_dio200_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_amplc_dio200);
+}
+
+module_init(driver_amplc_dio200_init_module);
+module_exit(driver_amplc_dio200_cleanup_module);
 #endif
 
 /*
index e94fb3e3d0e812d4bee5a0eb360e8f0528c01103..5ffee055c9a984c5e0c950eae739ea3d67e8287c 100644 (file)
@@ -184,7 +184,18 @@ static struct comedi_driver driver_amplc_pc236 = {
 #ifdef CONFIG_COMEDI_PCI
 COMEDI_PCI_INITCLEANUP(driver_amplc_pc236, pc236_pci_table);
 #else
-COMEDI_INITCLEANUP(driver_amplc_pc236);
+static int __init driver_amplc_pc236_init_module(void)
+{
+       return comedi_driver_register(&driver_amplc_pc236);
+}
+
+static void __exit driver_amplc_pc236_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_amplc_pc236);
+}
+
+module_init(driver_amplc_pc236_init_module);
+module_exit(driver_amplc_pc236_cleanup_module);
 #endif
 
 static int pc236_request_region(unsigned minor, unsigned long from,
index 14855e37476d463e93d6773f91c0c8af9f870586..83af437eb4366c68cbbef98d9a3bb6a7291b2800 100644 (file)
@@ -434,7 +434,18 @@ static int pc263_dio_insn_config(struct comedi_device *dev,
 #ifdef CONFIG_COMEDI_PCI
 COMEDI_PCI_INITCLEANUP(driver_amplc_pc263, pc263_pci_table);
 #else
-COMEDI_INITCLEANUP(driver_amplc_pc263);
+static int __init driver_amplc_pc263_init_module(void)
+{
+       return comedi_driver_register(&driver_amplc_pc263);
+}
+
+static void __exit driver_amplc_pc263_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_amplc_pc263);
+}
+
+module_init(driver_amplc_pc263_init_module);
+module_exit(driver_amplc_pc263_cleanup_module);
 #endif
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
index d830176bbd0269edb5636d703a20f16f4823a359..e0ac825ea58aa032e568ed024ef989e050cb4c92 100644 (file)
@@ -517,7 +517,18 @@ static int c6xdigio_detach(struct comedi_device *dev)
        return 0;
 }
 
-COMEDI_INITCLEANUP(driver_c6xdigio);
+static int __init driver_c6xdigio_init_module(void)
+{
+       return comedi_driver_register(&driver_c6xdigio);
+}
+
+static void __exit driver_c6xdigio_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_c6xdigio);
+}
+
+module_init(driver_c6xdigio_init_module);
+module_exit(driver_c6xdigio_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index d8d4ed6de35cbea437430eeba1eb4a5242487006..6d893c65adc8ff8c2aeee5ae4181c5ecbb77064e 100644 (file)
@@ -880,5 +880,16 @@ void __exit cleanup_module(void)
 }
 
 #else
-COMEDI_INITCLEANUP(driver_das16cs);
+static int __init driver_das16cs_init_module(void)
+{
+       return comedi_driver_register(&driver_das16cs);
+}
+
+static void __exit driver_das16cs_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_das16cs);
+}
+
+module_init(driver_das16cs_init_module);
+module_exit(driver_das16cs_cleanup_module);
 #endif /* CONFIG_PCMCIA */
index 9cf76fdd7cb103f3cbb15b20964489a9bf998615..21d834dd92b6408a948f5f419f3c3823539ce088 100644 (file)
@@ -101,7 +101,18 @@ static struct comedi_driver driver_parport = {
        .detach = parport_detach,
 };
 
-COMEDI_INITCLEANUP(driver_parport);
+static int __init driver_parport_init_module(void)
+{
+       return comedi_driver_register(&driver_parport);
+}
+
+static void __exit driver_parport_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_parport);
+}
+
+module_init(driver_parport_init_module);
+module_exit(driver_parport_cleanup_module);
 
 struct parport_private {
        unsigned int a_data;
index a21fe2e47a4ecdb4b11cbeb470a39aa399ac2f1d..b220b30554120028c6e4f4500061e9ca9e7e618a 100644 (file)
@@ -107,7 +107,18 @@ static struct comedi_driver driver_waveform = {
        .num_names = ARRAY_SIZE(waveform_boards),
 };
 
-COMEDI_INITCLEANUP(driver_waveform);
+static int __init driver_waveform_init_module(void)
+{
+       return comedi_driver_register(&driver_waveform);
+}
+
+static void __exit driver_waveform_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_waveform);
+}
+
+module_init(driver_waveform_init_module);
+module_exit(driver_waveform_cleanup_module);
 
 static int waveform_ai_cmdtest(struct comedi_device *dev,
                               struct comedi_subdevice *s,
index 3a52a0c0f926658c926ee9c452e8eed4f065ac57..c3f1fedc6eb71860891ba7324978fef00c7f6bd0 100644 (file)
@@ -1084,7 +1084,18 @@ EXPORT_SYMBOL_GPL(das08_common_detach);
 #ifdef CONFIG_COMEDI_PCI
 COMEDI_PCI_INITCLEANUP(driver_das08, das08_pci_table);
 #else
-COMEDI_INITCLEANUP(driver_das08);
+static int __init driver_das08_init_module(void)
+{
+       return comedi_driver_register(&driver_das08);
+}
+
+static void __exit driver_das08_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_das08);
+}
+
+module_init(driver_das08_init_module);
+module_exit(driver_das08_cleanup_module);
 #endif
 
 #ifdef CONFIG_COMEDI_PCMCIA
index 407d011a7606d20c0ac63a2faf408ffeb7a65bf7..0af1b465908829013eb498c5371195011ae5b3d8 100644 (file)
@@ -1717,7 +1717,18 @@ static int das16_detach(struct comedi_device *dev)
        return 0;
 }
 
-COMEDI_INITCLEANUP(driver_das16);
+static int __init driver_das16_init_module(void)
+{
+       return comedi_driver_register(&driver_das16);
+}
+
+static void __exit driver_das16_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_das16);
+}
+
+module_init(driver_das16_init_module);
+module_exit(driver_das16_cleanup_module);
 
 /* utility function that suggests a dma transfer size in bytes */
 static unsigned int das16_suggest_transfer_size(struct comedi_device *dev,
index 387a8cbe855dde638b07f1220c14804a047e86d1..a5ce3b2abe4a7c0486cabe830d3c51ba81b28bb9 100644 (file)
@@ -198,7 +198,18 @@ struct das16m1_private_struct {
 #define devpriv ((struct das16m1_private_struct *)(dev->private))
 #define thisboard ((const struct das16m1_board *)(dev->board_ptr))
 
-COMEDI_INITCLEANUP(driver_das16m1);
+static int __init driver_das16m1_init_module(void)
+{
+       return comedi_driver_register(&driver_das16m1);
+}
+
+static void __exit driver_das16m1_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_das16m1);
+}
+
+module_init(driver_das16m1_init_module);
+module_exit(driver_das16m1_cleanup_module);
 
 static inline short munge_sample(short data)
 {
index a68a1e47db82fdfc4e3d157a98620ba642bd126b..6ea93f9c0b483a4ff1042a1c26812fad869b507c 100644 (file)
@@ -531,7 +531,18 @@ static struct comedi_driver driver_das1800 = {
  * A convenient macro that defines init_module() and cleanup_module(),
  * as necessary.
  */
-COMEDI_INITCLEANUP(driver_das1800);
+static int __init driver_das1800_init_module(void)
+{
+       return comedi_driver_register(&driver_das1800);
+}
+
+static void __exit driver_das1800_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_das1800);
+}
+
+module_init(driver_das1800_init_module);
+module_exit(driver_das1800_cleanup_module);
 
 static int das1800_init_dma(struct comedi_device *dev, unsigned int dma0,
                            unsigned int dma1)
index 3aac876869dd87ed8f1ee2925a384aa370cd171f..6328f5280b6602755705d467b40f55064cd8f65c 100644 (file)
@@ -109,7 +109,18 @@ static struct comedi_driver driver_das6402 = {
        .detach = das6402_detach,
 };
 
-COMEDI_INITCLEANUP(driver_das6402);
+static int __init driver_das6402_init_module(void)
+{
+       return comedi_driver_register(&driver_das6402);
+}
+
+static void __exit driver_das6402_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_das6402);
+}
+
+module_init(driver_das6402_init_module);
+module_exit(driver_das6402_cleanup_module);
 
 struct das6402_private {
        int ai_bytes_to_read;
index b4083af4a66a413a3510a1d7dfe8213fb1c2c706..aecaedc5027e71e338abaac43ee4e455a8543dc8 100644 (file)
@@ -347,7 +347,18 @@ static int das800_probe(struct comedi_device *dev)
  * A convenient macro that defines init_module() and cleanup_module(),
  * as necessary.
  */
-COMEDI_INITCLEANUP(driver_das800);
+static int __init driver_das800_init_module(void)
+{
+       return comedi_driver_register(&driver_das800);
+}
+
+static void __exit driver_das800_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_das800);
+}
+
+module_init(driver_das800_init_module);
+module_exit(driver_das800_cleanup_module);
 
 /* interrupt service routine */
 static irqreturn_t das800_interrupt(int irq, void *d)
index 572b7a9e8673d446fe5eb0bc6df0e95d33e40583..dcde8d8dd406d15ba4ef1c47b444b4e0f16a3103 100644 (file)
@@ -1095,7 +1095,18 @@ void dmm32at_setaitimer(struct comedi_device *dev, unsigned int nansec)
  * A convenient macro that defines init_module() and cleanup_module(),
  * as necessary.
  */
-COMEDI_INITCLEANUP(driver_dmm32at);
+static int __init driver_dmm32at_init_module(void)
+{
+       return comedi_driver_register(&driver_dmm32at);
+}
+
+static void __exit driver_dmm32at_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_dmm32at);
+}
+
+module_init(driver_dmm32at_init_module);
+module_exit(driver_dmm32at_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index a6f1546b39e574168dca4e2dba3ba89ea958b2ed..5cce1b5f448479a780143127df79a79874adb623 100644 (file)
@@ -98,7 +98,18 @@ static struct comedi_driver driver_dt2801 = {
        .detach = dt2801_detach,
 };
 
-COMEDI_INITCLEANUP(driver_dt2801);
+static int __init driver_dt2801_init_module(void)
+{
+       return comedi_driver_register(&driver_dt2801);
+}
+
+static void __exit driver_dt2801_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_dt2801);
+}
+
+module_init(driver_dt2801_init_module);
+module_exit(driver_dt2801_cleanup_module);
 
 #if 0
 /* ignore 'defined but not used' warning */
index 2d103eb1ebc88ee34c9b4b36a7d041ca7fb58f00..a1664caa1d961fd89cf637f6c1a66efa0da093b3 100644 (file)
@@ -239,7 +239,18 @@ static struct comedi_driver driver_dt2811 = {
        .offset = sizeof(struct dt2811_board),
 };
 
-COMEDI_INITCLEANUP(driver_dt2811);
+static int __init driver_dt2811_init_module(void)
+{
+       return comedi_driver_register(&driver_dt2811);
+}
+
+static void __exit driver_dt2811_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_dt2811);
+}
+
+module_init(driver_dt2811_init_module);
+module_exit(driver_dt2811_cleanup_module);
 
 static int dt2811_ai_insn(struct comedi_device *dev, struct comedi_subdevice *s,
                          struct comedi_insn *insn, unsigned int *data);
index 0871fe0dc46fa841f50330548bd3b8a09c5797b6..1c6248cf5928144f7cf9d97ef5220d3d048f07ce 100644 (file)
@@ -70,7 +70,18 @@ static struct comedi_driver driver_dt2814 = {
        .detach = dt2814_detach,
 };
 
-COMEDI_INITCLEANUP(driver_dt2814);
+static int __init driver_dt2814_init_module(void)
+{
+       return comedi_driver_register(&driver_dt2814);
+}
+
+static void __exit driver_dt2814_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_dt2814);
+}
+
+module_init(driver_dt2814_init_module);
+module_exit(driver_dt2814_cleanup_module);
 
 static irqreturn_t dt2814_interrupt(int irq, void *dev);
 
index 8ff420eda1b1ee400de51058a1a80989d02e5bbf..4155da43fd517c6f4e36209967a6a7f57cf4b27f 100644 (file)
@@ -82,7 +82,18 @@ static struct comedi_driver driver_dt2815 = {
        .detach = dt2815_detach,
 };
 
-COMEDI_INITCLEANUP(driver_dt2815);
+static int __init driver_dt2815_init_module(void)
+{
+       return comedi_driver_register(&driver_dt2815);
+}
+
+static void __exit driver_dt2815_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_dt2815);
+}
+
+module_init(driver_dt2815_init_module);
+module_exit(driver_dt2815_cleanup_module);
 
 static void dt2815_free_resources(struct comedi_device *dev);
 
index 019aa4dfeeb3e5bbbec5976a5ac4e75a328a9744..651fe050d0299818a08182b04e3f527c3d138906 100644 (file)
@@ -57,7 +57,18 @@ static struct comedi_driver driver_dt2817 = {
        .detach = dt2817_detach,
 };
 
-COMEDI_INITCLEANUP(driver_dt2817);
+static int __init driver_dt2817_init_module(void)
+{
+       return comedi_driver_register(&driver_dt2817);
+}
+
+static void __exit driver_dt2817_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_dt2817);
+}
+
+module_init(driver_dt2817_init_module);
+module_exit(driver_dt2817_cleanup_module);
 
 static int dt2817_dio_insn_config(struct comedi_device *dev,
                                  struct comedi_subdevice *s,
index 58a2fdfcd340e5cfb79d199a41bbdc96e0cdaa53..8cea9dca3d7e64fcf098dee5277e41be9e7b9bf8 100644 (file)
@@ -423,7 +423,18 @@ static struct comedi_driver driver_dt282x = {
        .offset = sizeof(struct dt282x_board),
 };
 
-COMEDI_INITCLEANUP(driver_dt282x);
+static int __init driver_dt282x_init_module(void)
+{
+       return comedi_driver_register(&driver_dt282x);
+}
+
+static void __exit driver_dt282x_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_dt282x);
+}
+
+module_init(driver_dt282x_init_module);
+module_exit(driver_dt282x_cleanup_module);
 
 static void free_resources(struct comedi_device *dev);
 static int prep_ai_dma(struct comedi_device *dev, int chan, int size);
index 19f0184386129a961a16ca90a89b8984abbd4218..7f49add60b2137f345d05f6324c92c03cff0f568 100644 (file)
@@ -52,7 +52,18 @@ static struct comedi_driver driver_fl512 = {
        .detach = fl512_detach,
 };
 
-COMEDI_INITCLEANUP(driver_fl512);
+static int __init driver_fl512_init_module(void)
+{
+       return comedi_driver_register(&driver_fl512);
+}
+
+static void __exit driver_fl512_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_fl512);
+}
+
+module_init(driver_fl512_init_module);
+module_exit(driver_fl512_cleanup_module);
 
 static int fl512_ai_insn(struct comedi_device *dev,
                         struct comedi_subdevice *s, struct comedi_insn *insn,
index ba42478e6e1cb684c67c7868919f5dd227f4fa61..809d17efd5b35eeded7a220e590d997b1c81014e 100644 (file)
@@ -185,7 +185,18 @@ board_name : &boardtypes[0].name,
 offset : sizeof(struct boardtype),
 };
 
-COMEDI_INITCLEANUP(driver_icp_multi);
+static int __init driver_icp_multi_init_module(void)
+{
+       return comedi_driver_register(&driver_icp_multi);
+}
+
+static void __exit driver_icp_multi_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_icp_multi);
+}
+
+module_init(driver_icp_multi_init_module);
+module_exit(driver_icp_multi_cleanup_module);
 
 struct icp_multi_private {
        struct pcilst_struct *card;     /*  pointer to card */
index 0951f0e28a64338e5f4a63da27a8bfdb2921c81c..39a6a850d63c3287974eeea5c9a3fa874990af60 100644 (file)
@@ -640,7 +640,18 @@ static unsigned int pci20xxx_di(struct comedi_device *dev,
 }
 #endif
 
-COMEDI_INITCLEANUP(driver_pci20xxx);
+static int __init driver_pci20xxx_init_module(void)
+{
+       return comedi_driver_register(&driver_pci20xxx);
+}
+
+static void __exit driver_pci20xxx_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pci20xxx);
+}
+
+module_init(driver_pci20xxx_init_module);
+module_exit(driver_pci20xxx_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index df001e1738a09487ceef31414fab8e976efae6c5..a89eebd23f654ad68c6141455a2790127a7011f7 100644 (file)
@@ -406,7 +406,18 @@ static int mpc624_ai_rinsn(struct comedi_device *dev,
        return n;
 }
 
-COMEDI_INITCLEANUP(driver_mpc624);
+static int __init driver_mpc624_init_module(void)
+{
+       return comedi_driver_register(&driver_mpc624);
+}
+
+static void __exit driver_mpc624_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_mpc624);
+}
+
+module_init(driver_mpc624_init_module);
+module_exit(driver_mpc624_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index 440a144a037ea791d3d0cce27611a235f2f5bdc0..5f6816a3fe8ca9b6b74f054c09ca8fbbee3f09f8 100644 (file)
@@ -56,7 +56,18 @@ static struct comedi_driver driver_mpc8260cpm = {
        .detach = mpc8260cpm_detach,
 };
 
-COMEDI_INITCLEANUP(driver_mpc8260cpm);
+static int __init driver_mpc8260cpm_init_module(void)
+{
+       return comedi_driver_register(&driver_mpc8260cpm);
+}
+
+static void __exit driver_mpc8260cpm_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_mpc8260cpm);
+}
+
+module_init(driver_mpc8260cpm_init_module);
+module_exit(driver_mpc8260cpm_cleanup_module);
 
 static int mpc8260cpm_dio_config(struct comedi_device *dev,
                                 struct comedi_subdevice *s,
index 41bc51da388c6ced7aecd93636112a165352cae4..dace902d3bceb35ea2e778443f5a61787b5f59d7 100644 (file)
@@ -93,7 +93,18 @@ static struct comedi_driver driver_multiq3 = {
        .detach = multiq3_detach,
 };
 
-COMEDI_INITCLEANUP(driver_multiq3);
+static int __init driver_multiq3_init_module(void)
+{
+       return comedi_driver_register(&driver_multiq3);
+}
+
+static void __exit driver_multiq3_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_multiq3);
+}
+
+module_init(driver_multiq3_init_module);
+module_exit(driver_multiq3_cleanup_module);
 
 struct multiq3_private {
        unsigned int ao_readback[2];
index 709fc85ac703e1e30e55ef424cfaaa6ed2210c03..e46d62b75fc0a63d9484e63e0716a5f463140593 100644 (file)
@@ -197,7 +197,18 @@ static int a2150_set_chanlist(struct comedi_device *dev,
  * A convenient macro that defines init_module() and cleanup_module(),
  * as necessary.
  */
-COMEDI_INITCLEANUP(driver_a2150);
+static int __init driver_a2150_init_module(void)
+{
+       return comedi_driver_register(&driver_a2150);
+}
+
+static void __exit driver_a2150_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_a2150);
+}
+
+module_init(driver_a2150_init_module);
+module_exit(driver_a2150_cleanup_module);
 
 #ifdef A2150_DEBUG
 
index be1ddf28a549591cdfdd92a96ae3596bed681997..138dcc2275ab5c9af27f25c2c833352fc20204bb 100644 (file)
@@ -194,7 +194,18 @@ static struct comedi_driver driver_atao = {
        .num_names = ARRAY_SIZE(atao_boards),
 };
 
-COMEDI_INITCLEANUP(driver_atao);
+static int __init driver_atao_init_module(void)
+{
+       return comedi_driver_register(&driver_atao);
+}
+
+static void __exit driver_atao_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_atao);
+}
+
+module_init(driver_atao_init_module);
+module_exit(driver_atao_cleanup_module);
 
 static void atao_reset(struct comedi_device *dev);
 
index 003d00b595b08316498fc18e48809bd30eed245d..3330b3d53e8d4e8966074d72036ff38fe93d4ad1 100644 (file)
@@ -349,7 +349,18 @@ static struct comedi_driver driver_atmio = {
        .detach = ni_atmio_detach,
 };
 
-COMEDI_INITCLEANUP(driver_atmio);
+static int __init driver_atmio_init_module(void)
+{
+       return comedi_driver_register(&driver_atmio);
+}
+
+static void __exit driver_atmio_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_atmio);
+}
+
+module_init(driver_atmio_init_module);
+module_exit(driver_atmio_cleanup_module);
 
 #include "ni_mio_common.c"
 
index 78fdf7bfb33a28f33779fa3f7a9c23ed54ce0cab..285b933551abddb03ca8cbc152659841e0cf0535 100644 (file)
@@ -151,7 +151,18 @@ static struct comedi_driver driver_atmio16d = {
        .offset = sizeof(struct atmio16_board_t),
 };
 
-COMEDI_INITCLEANUP(driver_atmio16d);
+static int __init driver_atmio16d_init_module(void)
+{
+       return comedi_driver_register(&driver_atmio16d);
+}
+
+static void __exit driver_atmio16d_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_atmio16d);
+}
+
+module_init(driver_atmio16d_init_module);
+module_exit(driver_atmio16d_cleanup_module);
 
 /* range structs */
 static const struct comedi_lrange range_atmio16d_ai_10_bipolar = { 4, {
index 4966c8e496d53bb9773590bb7e1ca72a42673846..383ee1024ad389586d104a866475333fa6044d07 100644 (file)
@@ -2080,7 +2080,18 @@ static void write_caldac(struct comedi_device *dev, unsigned int channel,
 #ifdef CONFIG_COMEDI_PCI
 COMEDI_PCI_INITCLEANUP(driver_labpc, labpc_pci_table);
 #else
-COMEDI_INITCLEANUP(driver_labpc);
+static int __init driver_labpc_init_module(void)
+{
+       return comedi_driver_register(&driver_labpc);
+}
+
+static void __exit driver_labpc_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_labpc);
+}
+
+module_init(driver_labpc_init_module);
+module_exit(driver_labpc_cleanup_module);
 #endif
 
 EXPORT_SYMBOL_GPL(labpc_common_attach);
index 870c40a75463ecd6dd1c31cfcdbb255bda402af3..22d14fb3121b9ef3316cb6dd1de0c3457ecfbca0 100644 (file)
@@ -171,7 +171,18 @@ static struct comedi_driver driver_pcl711 = {
        .offset = sizeof(struct pcl711_board),
 };
 
-COMEDI_INITCLEANUP(driver_pcl711);
+static int __init driver_pcl711_init_module(void)
+{
+       return comedi_driver_register(&driver_pcl711);
+}
+
+static void __exit driver_pcl711_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pcl711);
+}
+
+module_init(driver_pcl711_init_module);
+module_exit(driver_pcl711_cleanup_module);
 
 struct pcl711_private {
 
index 2811060b424b35362761da43e249469996b94e88..396a058bb67dc242721408498dd2734370e145a6 100644 (file)
@@ -93,7 +93,18 @@ static struct comedi_driver driver_pcl724 = {
        .offset = sizeof(struct pcl724_board),
 };
 
-COMEDI_INITCLEANUP(driver_pcl724);
+static int __init driver_pcl724_init_module(void)
+{
+       return comedi_driver_register(&driver_pcl724);
+}
+
+static void __exit driver_pcl724_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pcl724);
+}
+
+module_init(driver_pcl724_init_module);
+module_exit(driver_pcl724_cleanup_module);
 
 static int subdev_8255_cb(int dir, int port, int data, unsigned long arg)
 {
index cab4c13fff995c653a8e7bc3193ea9f433a51930..24b223ca43993cee11266800457bd71b83d37e8c 100644 (file)
@@ -30,7 +30,18 @@ static struct comedi_driver driver_pcl725 = {
        .detach = pcl725_detach,
 };
 
-COMEDI_INITCLEANUP(driver_pcl725);
+static int __init driver_pcl725_init_module(void)
+{
+       return comedi_driver_register(&driver_pcl725);
+}
+
+static void __exit driver_pcl725_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pcl725);
+}
+
+module_init(driver_pcl725_init_module);
+module_exit(driver_pcl725_cleanup_module);
 
 static int pcl725_do_insn(struct comedi_device *dev, struct comedi_subdevice *s,
                          struct comedi_insn *insn, unsigned int *data)
index e54463136cc8388e3da14ecb2938d86dc77ad59f..897cd808eeb77f16a6ebf64701458c870fd5fbb0 100644 (file)
@@ -162,7 +162,18 @@ static struct comedi_driver driver_pcl726 = {
        .offset = sizeof(struct pcl726_board),
 };
 
-COMEDI_INITCLEANUP(driver_pcl726);
+static int __init driver_pcl726_init_module(void)
+{
+       return comedi_driver_register(&driver_pcl726);
+}
+
+static void __exit driver_pcl726_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pcl726);
+}
+
+module_init(driver_pcl726_init_module);
+module_exit(driver_pcl726_cleanup_module);
 
 struct pcl726_private {
 
index 7d4f29a71423339fbed35a90aae6c54367841994..c9682d614e0e3daa688c51a67c1965fdc9e9f817 100644 (file)
@@ -55,7 +55,18 @@ static struct comedi_driver driver_pcl730 = {
        .offset = sizeof(struct pcl730_board),
 };
 
-COMEDI_INITCLEANUP(driver_pcl730);
+static int __init driver_pcl730_init_module(void)
+{
+       return comedi_driver_register(&driver_pcl730);
+}
+
+static void __exit driver_pcl730_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pcl730);
+}
+
+module_init(driver_pcl730_init_module);
+module_exit(driver_pcl730_cleanup_module);
 
 static int pcl730_do_insn(struct comedi_device *dev, struct comedi_subdevice *s,
                          struct comedi_insn *insn, unsigned int *data)
index b82c37c5d1674536803581135032f78a023a91d2..943fb713bd7d54ff4f6489fdb13d3e35b72184a5 100644 (file)
@@ -407,7 +407,18 @@ static struct comedi_driver driver_pcl812 = {
        .offset = sizeof(struct pcl812_board),
 };
 
-COMEDI_INITCLEANUP(driver_pcl812);
+static int __init driver_pcl812_init_module(void)
+{
+       return comedi_driver_register(&driver_pcl812);
+}
+
+static void __exit driver_pcl812_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pcl812);
+}
+
+module_init(driver_pcl812_init_module);
+module_exit(driver_pcl812_cleanup_module);
 
 struct pcl812_private {
 
index c26dfad2c8976fb4f62932ece11b39a64b3aeeec..a84b942c5a9361332884efaa489c1a806236d956 100644 (file)
@@ -168,7 +168,18 @@ static struct comedi_driver driver_pcl816 = {
        .offset = sizeof(struct pcl816_board),
 };
 
-COMEDI_INITCLEANUP(driver_pcl816);
+static int __init driver_pcl816_init_module(void)
+{
+       return comedi_driver_register(&driver_pcl816);
+}
+
+static void __exit driver_pcl816_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pcl816);
+}
+
+module_init(driver_pcl816_init_module);
+module_exit(driver_pcl816_cleanup_module);
 
 struct pcl816_private {
 
index 887f1c37aa6bca23dcb77c4a96693d8d91467dc8..d2bd6f82b830b3b3a5f6c45946c658a9f40a418c 100644 (file)
@@ -313,7 +313,18 @@ static struct comedi_driver driver_pcl818 = {
        .offset = sizeof(struct pcl818_board),
 };
 
-COMEDI_INITCLEANUP(driver_pcl818);
+static int __init driver_pcl818_init_module(void)
+{
+       return comedi_driver_register(&driver_pcl818);
+}
+
+static void __exit driver_pcl818_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pcl818);
+}
+
+module_init(driver_pcl818_init_module);
+module_exit(driver_pcl818_cleanup_module);
 
 struct pcl818_private {
 
index 972cd2bdf454be2ea08ac661375a842d1f5060d7..26850954442f11e6951f184579485d0c1cd28e8f 100644 (file)
@@ -97,7 +97,18 @@ static struct comedi_driver driver_pcm3724 = {
        .offset = sizeof(struct pcm3724_board),
 };
 
-COMEDI_INITCLEANUP(driver_pcm3724);
+static int __init driver_pcm3724_init_module(void)
+{
+       return comedi_driver_register(&driver_pcm3724);
+}
+
+static void __exit driver_pcm3724_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pcm3724);
+}
+
+module_init(driver_pcm3724_init_module);
+module_exit(driver_pcm3724_cleanup_module);
 
 /* (setq c-basic-offset 8) */
 
index 3c826b7b8e7593a8cb58566723fe3397aa3179c0..bada6b236ff13a4d66612dfd39a761bef81a88f4 100644 (file)
@@ -38,7 +38,18 @@ static struct comedi_driver driver_pcm3730 = {
        .detach = pcm3730_detach,
 };
 
-COMEDI_INITCLEANUP(driver_pcm3730);
+static int __init driver_pcm3730_init_module(void)
+{
+       return comedi_driver_register(&driver_pcm3730);
+}
+
+static void __exit driver_pcm3730_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pcm3730);
+}
+
+module_init(driver_pcm3730_init_module);
+module_exit(driver_pcm3730_cleanup_module);
 
 static int pcm3730_do_insn_bits(struct comedi_device *dev,
                                struct comedi_subdevice *s,
index 9f63a6cacfca37f8fe823431c2deb87a8d45da7a..23b3d777340ca5eb9c1471c67e7401716ab58ee5 100644 (file)
@@ -89,7 +89,18 @@ static struct comedi_driver driver_pcmad = {
        .offset = sizeof(pcmad_boards[0]),
 };
 
-COMEDI_INITCLEANUP(driver_pcmad);
+static int __init driver_pcmad_init_module(void)
+{
+       return comedi_driver_register(&driver_pcmad);
+}
+
+static void __exit driver_pcmad_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_pcmad);
+}
+
+module_init(driver_pcmad_init_module);
+module_exit(driver_pcmad_cleanup_module);
 
 #define TIMEOUT        100
 
index b09c0da8690c5f8c61c2199ccbd1486c3ae9fb7c..6d6b86ad817d5477c735c05b1cba72b0f98f440b 100644 (file)
@@ -303,7 +303,18 @@ static int ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
  * A convenient macro that defines init_module() and cleanup_module(),
  * as necessary.
  */
-COMEDI_INITCLEANUP(driver);
+static int __init driver_init_module(void)
+{
+       return comedi_driver_register(&driver);
+}
+
+static void __exit driver_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver);
+}
+
+module_init(driver_init_module);
+module_exit(driver_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index 3e80da04277fa42574d2023016ed438a77bbf7a2..f0df9d1e4fec8cfdea482bc6ca514fb9cb9820f4 100644 (file)
@@ -1333,7 +1333,18 @@ static int ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
  * A convenient macro that defines init_module() and cleanup_module(),
  * as necessary.
  */
-COMEDI_INITCLEANUP(driver);
+static int __init driver_init_module(void)
+{
+       return comedi_driver_register(&driver);
+}
+
+static void __exit driver_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver);
+}
+
+module_init(driver_init_module);
+module_exit(driver_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index 785b3ec8fec878e2caf8ddafe8a39932b90feb66..7a9287433b2e69c494b3a0f52a32a09db95a71aa 100644 (file)
@@ -1018,7 +1018,18 @@ pcmuio_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
  * A convenient macro that defines init_module() and cleanup_module(),
  * as necessary.
  */
-COMEDI_INITCLEANUP(driver);
+static int __init driver_init_module(void)
+{
+       return comedi_driver_register(&driver);
+}
+
+static void __exit driver_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver);
+}
+
+module_init(driver_init_module);
+module_exit(driver_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index 9270b9f1582327c9ed4dd670df8c0f1ef275247f..831a576c24aaa2fdd23e65e09a5c45d9d9575f60 100644 (file)
@@ -248,7 +248,18 @@ static int pcl734_insn_bits(struct comedi_device *dev,
        return 2;
 }
 
-COMEDI_INITCLEANUP(driver_poc);
+static int __init driver_poc_init_module(void)
+{
+       return comedi_driver_register(&driver_poc);
+}
+
+static void __exit driver_poc_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_poc);
+}
+
+module_init(driver_poc_init_module);
+module_exit(driver_poc_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index 4add6332850803096a5cd95a71f6d478543089ef..72042b818310418d24809e6340b7dcad1a25a78c 100644 (file)
@@ -158,7 +158,18 @@ static struct comedi_driver driver_rti800 = {
        .offset = sizeof(struct rti800_board),
 };
 
-COMEDI_INITCLEANUP(driver_rti800);
+static int __init driver_rti800_init_module(void)
+{
+       return comedi_driver_register(&driver_rti800);
+}
+
+static void __exit driver_rti800_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_rti800);
+}
+
+module_init(driver_rti800_init_module);
+module_exit(driver_rti800_cleanup_module);
 
 static irqreturn_t rti800_interrupt(int irq, void *dev);
 
index 132415b2d00511b15be571533cfaa7a88028c90e..f59cb11590f68e0c05d5b86c07987e89e8a8e53c 100644 (file)
@@ -57,7 +57,18 @@ static struct comedi_driver driver_rti802 = {
        .detach = rti802_detach,
 };
 
-COMEDI_INITCLEANUP(driver_rti802);
+static int __init driver_rti802_init_module(void)
+{
+       return comedi_driver_register(&driver_rti802);
+}
+
+static void __exit driver_rti802_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_rti802);
+}
+
+module_init(driver_rti802_init_module);
+module_exit(driver_rti802_cleanup_module);
 
 struct rti802_private {
        enum {
index 8afed1307bdd0ac78d35ad4a52ea0189c6b0fc70..3607aaee4af62a1b5b5954809219d2974331e2c6 100644 (file)
@@ -1002,7 +1002,18 @@ static int s526_dio_insn_config(struct comedi_device *dev,
  * A convenient macro that defines init_module() and cleanup_module(),
  * as necessary.
  */
-COMEDI_INITCLEANUP(driver_s526);
+static int __init driver_s526_init_module(void)
+{
+       return comedi_driver_register(&driver_s526);
+}
+
+static void __exit driver_s526_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_s526);
+}
+
+module_init(driver_s526_init_module);
+module_exit(driver_s526_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index 85d127fb7eb1db9c2cbb37190512e07798906076..c9be9e05f0286680798b6900b3b85d3c03b4385b 100644 (file)
@@ -917,7 +917,18 @@ static int serial2002_detach(struct comedi_device *dev)
        return 0;
 }
 
-COMEDI_INITCLEANUP(driver_serial2002);
+static int __init driver_serial2002_init_module(void)
+{
+       return comedi_driver_register(&driver_serial2002);
+}
+
+static void __exit driver_serial2002_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_serial2002);
+}
+
+module_init(driver_serial2002_init_module);
+module_exit(driver_serial2002_cleanup_module);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
 MODULE_DESCRIPTION("Comedi low-level driver");
index 5a0767333bbc8eea3df559629afba3fcc44027bb..d1d5437c59952601c1e9dac4be480ca3a6828b96 100644 (file)
@@ -620,11 +620,18 @@ static int skel_dio_insn_config(struct comedi_device *dev,
        return insn->n;
 }
 
-/*
- * A convenient macro that defines init_module() and cleanup_module(),
- * as necessary.
- */
-COMEDI_INITCLEANUP(driver_skel);
+static int __init driver_skel_init_module(void)
+{
+       return comedi_driver_register(&driver_skel);
+}
+
+static void __exit driver_skel_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_skel);
+}
+
+module_init(driver_skel_init_module);
+module_exit(driver_skel_cleanup_module);
 /* If you are writing a PCI driver you should use COMEDI_PCI_INITCLEANUP
  * instead.
  */
index ce0cbb4c37bf69b6ae0e84c5428f4d0106726fa1..526de2efa125ebe09f07ab0ec628d7a8b1880b49 100644 (file)
@@ -102,7 +102,18 @@ static struct comedi_driver driver_dnp = {
        .num_names = ARRAY_SIZE(dnp_boards),
 };
 
-COMEDI_INITCLEANUP(driver_dnp);
+static int __init driver_dnp_init_module(void)
+{
+       return comedi_driver_register(&driver_dnp);
+}
+
+static void __exit driver_dnp_cleanup_module(void)
+{
+       comedi_driver_unregister(&driver_dnp);
+}
+
+module_init(driver_dnp_init_module);
+module_exit(driver_dnp_cleanup_module);
 
 static int dnp_dio_insn_bits(struct comedi_device *dev,
                             struct comedi_subdevice *s,
index 1aca98895f83eb1af677997b989680f9a32eadd4..598884ec3ede576afcf3b49cd35e4d2a375d4222 100644 (file)
@@ -114,7 +114,18 @@ static struct comedi_driver unioxx5_driver = {
        .detach = unioxx5_detach
 };
 
-COMEDI_INITCLEANUP(unioxx5_driver);
+static int __init unioxx5_driver_init_module(void)
+{
+       return comedi_driver_register(&unioxx5_driver);
+}
+
+static void __exit unioxx5_driver_cleanup_module(void)
+{
+       comedi_driver_unregister(&unioxx5_driver);
+}
+
+module_init(unioxx5_driver_init_module);
+module_exit(unioxx5_driver_cleanup_module);
 
 static int unioxx5_attach(struct comedi_device *dev,
                          struct comedi_devconfig *it)