From 66bf1ed6f6d8364a67c1c15c2fd2885b0f268405 Mon Sep 17 00:00:00 2001 From: Peter Huewe Date: Mon, 14 Jan 2013 22:00:52 +0100 Subject: [PATCH] staging/comedi/cb_das16_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/cb_das16_cs.c | 25 +------------------- 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index 93731de1f2b1..e253fc03cefa 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c @@ -548,30 +548,7 @@ static struct pcmcia_driver das16cs_driver = { .id_table = das16cs_id_table, }; -static int __init das16cs_init(void) -{ - int ret; - - ret = comedi_driver_register(&driver_das16cs); - if (ret < 0) - return ret; - - ret = pcmcia_register_driver(&das16cs_driver); - if (ret < 0) { - comedi_driver_unregister(&driver_das16cs); - return ret; - } - - return 0; -} -module_init(das16cs_init); - -static void __exit das16cs_exit(void) -{ - pcmcia_unregister_driver(&das16cs_driver); - comedi_driver_unregister(&driver_das16cs); -} -module_exit(das16cs_exit); +module_comedi_pcmcia_driver(driver_das16cs, das16cs_driver); MODULE_AUTHOR("David A. Schleef "); MODULE_DESCRIPTION("Comedi driver for Computer Boards PC-CARD DAS16/16"); -- 2.20.1