From 7915ce0e6ffef01fc78f157c5158c139f2e7c441 Mon Sep 17 00:00:00 2001 From: Peter Huewe Date: Mon, 14 Jan 2013 22:00:53 +0100 Subject: [PATCH] staging/comedi/das08_cs: 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/das08_cs.c | 26 +---------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c index 024262375e3c..73a2418933f7 100644 --- a/drivers/staging/comedi/drivers/das08_cs.c +++ b/drivers/staging/comedi/drivers/das08_cs.c @@ -181,31 +181,7 @@ static struct pcmcia_driver das08_cs_driver = { .id_table = das08_cs_id_table, }; -static int __init das08_cs_init_module(void) -{ - int ret; - - ret = comedi_driver_register(&driver_das08_cs); - if (ret < 0) - return ret; - - ret = pcmcia_register_driver(&das08_cs_driver); - if (ret < 0) { - comedi_driver_unregister(&driver_das08_cs); - return ret; - } - - return 0; - -} -module_init(das08_cs_init_module); - -static void __exit das08_cs_exit_module(void) -{ - pcmcia_unregister_driver(&das08_cs_driver); - comedi_driver_unregister(&driver_das08_cs); -} -module_exit(das08_cs_exit_module); +module_comedi_pcmcia_driver(driver_das08_cs, das08_cs_driver); MODULE_AUTHOR("David A. Schleef , " "Frank Mori Hess "); -- 2.39.5