Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

uio/uio_netx: Use module_pci_driver to register driver

Removing some boilerplate by using module_pci_driver instead of calling
register and unregister in the otherwise empty init/exit functions.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Peter Huewe and committed by
Greg Kroah-Hartman
b59f9a05 8bcaec4e

+1 -13
+1 -13
drivers/uio/uio_netx.c
··· 174 174 .remove = netx_pci_remove, 175 175 }; 176 176 177 - static int __init netx_init_module(void) 178 - { 179 - return pci_register_driver(&netx_pci_driver); 180 - } 181 - 182 - static void __exit netx_exit_module(void) 183 - { 184 - pci_unregister_driver(&netx_pci_driver); 185 - } 186 - 187 - module_init(netx_init_module); 188 - module_exit(netx_exit_module); 189 - 177 + module_pci_driver(netx_pci_driver); 190 178 MODULE_DEVICE_TABLE(pci, netx_pci_ids); 191 179 MODULE_LICENSE("GPL v2"); 192 180 MODULE_AUTHOR("Hans J. Koch, Manuel Traut");