From: Peter Huewe Date: Mon, 14 Jan 2013 21:00:54 +0000 (+0100) Subject: staging/comedi/ni_daq_700: Convert to module_comedi_pcmcia_driver X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8ee8f77d9f0f932d9d542a3b2053e092b18ee2b8;p=linux-beck.git staging/comedi/ni_daq_700: Convert to module_comedi_pcmcia_driver This patch removes the boring init/exit functions with the new module_comedi_pcmcia_driver macro. Signed-off-by: Peter Huewe Signed-off-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index 68d7c6a5db7d..ff0e1993f173 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c @@ -334,30 +334,7 @@ static struct pcmcia_driver daq700_cs_driver = { .id_table = daq700_cs_ids, }; -static int __init daq700_cs_init(void) -{ - int ret; - - ret = comedi_driver_register(&daq700_driver); - if (ret < 0) - return ret; - - ret = pcmcia_register_driver(&daq700_cs_driver); - if (ret < 0) { - comedi_driver_unregister(&daq700_driver); - return ret; - } - - return 0; -} -module_init(daq700_cs_init); - -static void __exit daq700_cs_exit(void) -{ - pcmcia_unregister_driver(&daq700_cs_driver); - comedi_driver_unregister(&daq700_driver); -} -module_exit(daq700_cs_exit); +module_comedi_pcmcia_driver(daq700_driver, daq700_cs_driver); MODULE_AUTHOR("Fred Brooks "); MODULE_DESCRIPTION(