Commit 1ce6853a authored by Wei Yongjun's avatar Wei Yongjun Committed by Rusty Russell
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 681f2066
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -830,16 +830,4 @@ static struct pci_driver virtio_pci_driver = {
#endif
};

static int __init virtio_pci_init(void)
{
	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);
module_pci_driver(virtio_pci_driver);