From cb798ccfa0653afe56dd85a48057c1222d19e0b8 Mon Sep 17 00:00:00 2001 From: Peter Huewe Date: Mon, 14 Jan 2013 22:00:49 +0100 Subject: [PATCH] staging/comedi/ni_daq_dio24: 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 --- drivers/staging/comedi/drivers/ni_daq_dio24.c | 29 +------------------ 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index 7b333353c5d9..dd22691b1df1 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c @@ -318,31 +318,4 @@ static struct pcmcia_driver dio24_cs_driver = { .name = "ni_daq_dio24", }; -static int __init init_dio24_cs(void) -{ - printk("ni_daq_dio24: HOLA SOY YO!\n"); - pcmcia_register_driver(&dio24_cs_driver); - return 0; -} - -static void __exit exit_dio24_cs(void) -{ - pcmcia_unregister_driver(&dio24_cs_driver); -} - -int __init init_module(void) -{ - int ret; - - ret = init_dio24_cs(); - if (ret < 0) - return ret; - - return comedi_driver_register(&driver_dio24); -} - -void __exit cleanup_module(void) -{ - exit_dio24_cs(); - comedi_driver_unregister(&driver_dio24); -} +module_comedi_pcmcia_driver(driver_dio24, dio24_cs_driver); -- 2.39.5