staging/comedi/ni_mio_cs: Convert to module_comedi_pcmcia_driver
authorPeter Huewe <peterhuewe@gmx.de>
Mon, 14 Jan 2013 21:00:50 +0000 (22:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Jan 2013 00:59:25 +0000 (16:59 -0800)
This patch removes the boring init/exit functions with the new
module_comedi_pcmcia_driver macro.

Also removed the superflous #ifdef MODULE

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_mio_cs.c

index 76c6a13ea9d627ad0e8fbcc5b3f5c576dda5c1d5..b5c5d58352dcdf10c66ee9e10d2d2edbbb5f8395 100644 (file)
@@ -408,8 +408,6 @@ static int ni_getboardtype(struct comedi_device *dev,
        return 0;
 }
 
-#ifdef MODULE
-
 static const struct pcmcia_device_id ni_mio_cs_ids[] = {
        PCMCIA_DEVICE_MANF_CARD(0x010b, 0x010d),        /* DAQCard-ai-16xe-50 */
        PCMCIA_DEVICE_MANF_CARD(0x010b, 0x010c),        /* DAQCard-ai-16e-4 */
@@ -434,20 +432,4 @@ static struct pcmcia_driver ni_mio_cs_driver = {
        .name = "ni_mio_cs",
 };
 
-int init_module(void)
-{
-       pcmcia_register_driver(&ni_mio_cs_driver);
-       comedi_driver_register(&driver_ni_mio_cs);
-       return 0;
-}
-
-void cleanup_module(void)
-{
-       pcmcia_unregister_driver(&ni_mio_cs_driver);
-#if 0
-       while (cur_dev != NULL)
-               cs_detach(cur_dev->handle);
-#endif
-       comedi_driver_unregister(&driver_ni_mio_cs);
-}
-#endif
+module_comedi_pcmcia_driver(driver_ni_mio_cs, ni_mio_cs_driver);