Staging: comedi: Remove COMEDI_PCI_INITCLEANUP macro
[deliverable/linux.git] / drivers / staging / comedi / drivers / adv_pci1710.c
index 67c4f11a36ab261eb045b26925e1fe131f0dbb64..2791f9037b9889a2ea6cf977906ac6f53cec5607 100644 (file)
@@ -1609,7 +1609,47 @@ static int pci1710_detach(struct comedi_device *dev)
 /*
 ==============================================================================
 */
-COMEDI_PCI_INITCLEANUP(driver_pci1710, pci1710_pci_table);
+static int __devinit driver_pci1710_pci_probe(struct pci_dev *dev,
+                                             const struct pci_device_id *ent)
+{
+       return comedi_pci_auto_config(dev, driver_pci1710.driver_name);
+}
+
+static void __devexit driver_pci1710_pci_remove(struct pci_dev *dev)
+{
+       comedi_pci_auto_unconfig(dev);
+}
+
+static struct pci_driver driver_pci1710_pci_driver = {
+       .id_table = pci1710_pci_table,
+       .probe = &driver_pci1710_pci_probe,
+       .remove = __devexit_p(&driver_pci1710_pci_remove)
+};
+
+static int __init driver_pci1710_init_module(void)
+{
+       int retval;
+
+       retval = comedi_driver_register(&driver_pci1710);
+       if (retval < 0)
+               return retval;
+
+       driver_pci1710_pci_driver.name = (char *)driver_pci1710.driver_name;
+       return pci_register_driver(&driver_pci1710_pci_driver);
+}
+
+static void __exit driver_pci1710_cleanup_module(void)
+{
+       pci_unregister_driver(&driver_pci1710_pci_driver);
+       comedi_driver_unregister(&driver_pci1710);
+}
+
+module_init(driver_pci1710_init_module);
+module_exit(driver_pci1710_cleanup_module);
 /*
 ==============================================================================
 */
+
+MODULE_AUTHOR("Comedi http://www.comedi.org");
+MODULE_DESCRIPTION("Comedi low-level driver");
+MODULE_LICENSE("GPL");
This page took 0.098406 seconds and 5 git commands to generate.