Use the `module_comedi_pci_driver()` macro to register the module as a comedi PCI driver instead of adding the boiler-plate code in full. Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx> --- drivers/staging/comedi/drivers/skel.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/staging/comedi/drivers/skel.c b/drivers/staging/comedi/drivers/skel.c index 6728535..d628339 100644 --- a/drivers/staging/comedi/drivers/skel.c +++ b/drivers/staging/comedi/drivers/skel.c @@ -598,27 +598,7 @@ static struct pci_driver skel_pci_driver = { .probe = &skel_pci_probe, .remove = __devexit_p(&skel_pci_remove) }; - -static int __init skel_init_module(void) -{ - int retval; - - retval = comedi_driver_register(&skel_driver); - if (retval < 0) - return retval; - - skel_pci_driver.name = (char *)skel_driver.driver_name; - return pci_register_driver(&skel_pci_driver); -} - -static void __exit skel_cleanup_module(void) -{ - pci_unregister_driver(&skel_pci_driver); - comedi_driver_unregister(&skel_driver); -} - -module_init(skel_init_module); -module_exit(skel_cleanup_module); +module_comedi_pci_driver(skel_driver, skel_pci_driver); #else module_comedi_driver(skel_driver); #endif -- 1.7.12.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel