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

serial: 8250_pci: use module_pci_driver to simplify the code

Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Wei Yongjun and committed by
Greg Kroah-Hartman
15a12e83 669fef46

+1 -12
+1 -12
drivers/tty/serial/8250/8250_pci.c
··· 4332 4332 .err_handler = &serial8250_err_handler, 4333 4333 }; 4334 4334 4335 - static int __init serial8250_pci_init(void) 4336 - { 4337 - return pci_register_driver(&serial_pci_driver); 4338 - } 4339 - 4340 - static void __exit serial8250_pci_exit(void) 4341 - { 4342 - pci_unregister_driver(&serial_pci_driver); 4343 - } 4344 - 4345 - module_init(serial8250_pci_init); 4346 - module_exit(serial8250_pci_exit); 4335 + module_pci_driver(serial_pci_driver); 4347 4336 4348 4337 MODULE_LICENSE("GPL"); 4349 4338 MODULE_DESCRIPTION("Generic 8250/16x50 PCI serial probe module");