提交 1ce6853a 编写于 作者: W Wei Yongjun 提交者: Rusty Russell

virtio-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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
上级 681f2066
...@@ -830,16 +830,4 @@ static struct pci_driver virtio_pci_driver = { ...@@ -830,16 +830,4 @@ static struct pci_driver virtio_pci_driver = {
#endif #endif
}; };
static int __init virtio_pci_init(void) module_pci_driver(virtio_pci_driver);
{
return pci_register_driver(&virtio_pci_driver);
}
module_init(virtio_pci_init);
static void __exit virtio_pci_exit(void)
{
pci_unregister_driver(&virtio_pci_driver);
}
module_exit(virtio_pci_exit);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册