From: Wei Yongjun Date: Tue, 16 Oct 2012 13:26:13 +0000 (+1030) Subject: virtio-pci: use module_pci_driver to simplify the code X-Git-Tag: next-20121023~51^2~10 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3d524bc5df9db8d12841f406c065329ce9ebb71e;p=karo-tx-linux.git 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: Wei Yongjun Signed-off-by: Rusty Russell --- diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index c33aea36598a..b59237c1d540 100644 --- a/drivers/virtio/virtio_pci.c +++ b/drivers/virtio/virtio_pci.c @@ -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);