]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/comedi/quatech_daqp_cs: Convert to module_comedi_pcmcia_driver
authorPeter Huewe <peterhuewe@gmx.de>
Mon, 14 Jan 2013 21:00:51 +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/quatech_daqp_cs.c

index ef0cdaa7f02e4b75e2aa7886a70190a0c392de1b..55d8cc641967a807a3b5e85d8bb96f28e4edca17 100644 (file)
@@ -1038,9 +1038,6 @@ static int daqp_cs_resume(struct pcmcia_device *link)
 }
 
 /*====================================================================*/
-
-#ifdef MODULE
-
 static const struct pcmcia_device_id daqp_cs_id_table[] = {
        PCMCIA_DEVICE_MANF_CARD(0x0137, 0x0027),
        PCMCIA_DEVICE_NULL
@@ -1061,17 +1058,4 @@ static struct pcmcia_driver daqp_cs_driver = {
        .name = "quatech_daqp_cs",
 };
 
-int __init init_module(void)
-{
-       pcmcia_register_driver(&daqp_cs_driver);
-       comedi_driver_register(&driver_daqp);
-       return 0;
-}
-
-void __exit cleanup_module(void)
-{
-       comedi_driver_unregister(&driver_daqp);
-       pcmcia_unregister_driver(&daqp_cs_driver);
-}
-
-#endif
+module_comedi_pcmcia_driver(driver_daqp, daqp_cs_driver);