diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-26 11:04:22 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-30 17:04:52 -0400 |
commit | 15a12e83da812e9116577d46b048923587da5000 (patch) | |
tree | f61236e05c6f0fe7b0634bef618717814e43a6ee /drivers/tty | |
parent | 669fef464468d3f02d60a5cf725fc097e03c5cb8 (diff) |
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>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250/8250_pci.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/tty/serial/8250/8250_pci.c b/drivers/tty/serial/8250/8250_pci.c index cec8852dd1b6..508063b2a4b8 100644 --- a/drivers/tty/serial/8250/8250_pci.c +++ b/drivers/tty/serial/8250/8250_pci.c | |||
@@ -4332,18 +4332,7 @@ static struct pci_driver serial_pci_driver = { | |||
4332 | .err_handler = &serial8250_err_handler, | 4332 | .err_handler = &serial8250_err_handler, |
4333 | }; | 4333 | }; |
4334 | 4334 | ||
4335 | static int __init serial8250_pci_init(void) | 4335 | module_pci_driver(serial_pci_driver); |
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); | ||
4347 | 4336 | ||
4348 | MODULE_LICENSE("GPL"); | 4337 | MODULE_LICENSE("GPL"); |
4349 | MODULE_DESCRIPTION("Generic 8250/16x50 PCI serial probe module"); | 4338 | MODULE_DESCRIPTION("Generic 8250/16x50 PCI serial probe module"); |