* [PATCH] virtio-pci: use module_pci_driver to simplify the code
@ 2012-10-11 1:10 Wei Yongjun
2012-10-11 8:32 ` Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2012-10-11 1:10 UTC (permalink / raw)
To: rusty, mst; +Cc: yongjun_wei, virtualization, linux-kernel
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
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>
---
drivers/virtio/virtio_pci.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index c33aea3..b59237c 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);
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] virtio-pci: use module_pci_driver to simplify the code
2012-10-11 1:10 [PATCH] virtio-pci: use module_pci_driver to simplify the code Wei Yongjun
@ 2012-10-11 8:32 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2012-10-11 8:32 UTC (permalink / raw)
To: Wei Yongjun, mst; +Cc: yongjun_wei, virtualization, linux-kernel
Wei Yongjun <weiyj.lk@gmail.com> writes:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> 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>
Thanks, applied!
Rusty.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-10-11 20:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-11 1:10 [PATCH] virtio-pci: use module_pci_driver to simplify the code Wei Yongjun
2012-10-11 8:32 ` Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox