Commit b61b2b1f authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: skel: use module_comedi_pci_driver()

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: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6bdc31db
...@@ -598,27 +598,7 @@ static struct pci_driver skel_pci_driver = { ...@@ -598,27 +598,7 @@ static struct pci_driver skel_pci_driver = {
.probe = &skel_pci_probe, .probe = &skel_pci_probe,
.remove = __devexit_p(&skel_pci_remove) .remove = __devexit_p(&skel_pci_remove)
}; };
module_comedi_pci_driver(skel_driver, skel_pci_driver);
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);
#else #else
module_comedi_driver(skel_driver); module_comedi_driver(skel_driver);
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment