--- zzzz-none-000/linux-3.10.107/drivers/uio/uio_sercos3.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/uio/uio_sercos3.c 2021-02-04 17:41:59.000000000 +0000 @@ -188,7 +188,6 @@ uio_unregister_device(info); pci_release_regions(dev); pci_disable_device(dev); - pci_set_drvdata(dev, NULL); for (i = 0; i < 5; i++) { if (info->mem[i].internal_addr) iounmap(info->mem[i].internal_addr); @@ -226,19 +225,7 @@ .remove = sercos3_pci_remove, }; -static int __init sercos3_init_module(void) -{ - return pci_register_driver(&sercos3_pci_driver); -} - -static void __exit sercos3_exit_module(void) -{ - pci_unregister_driver(&sercos3_pci_driver); -} - -module_init(sercos3_init_module); -module_exit(sercos3_exit_module); - +module_pci_driver(sercos3_pci_driver); MODULE_DESCRIPTION("UIO driver for the Automata Sercos III PCI card"); MODULE_AUTHOR("John Ogness "); MODULE_LICENSE("GPL v2");