diff options
| author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2012-10-16 09:26:13 -0400 |
|---|---|---|
| committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-12-17 23:50:30 -0500 |
| commit | 1ce6853aa0f8e1cc3ae811a85d50cde6ad0ef735 (patch) | |
| tree | 8b9562a60b6de855b18ad0b413cbbae3374a73bc /drivers | |
| parent | 681f206611aaec4fc8be93d609148e02c704b91d (diff) | |
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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/virtio/virtio_pci.c | 14 |
1 files changed, 1 insertions, 13 deletions
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 = { | |||
| 830 | #endif | 830 | #endif |
| 831 | }; | 831 | }; |
| 832 | 832 | ||
| 833 | static int __init virtio_pci_init(void) | 833 | module_pci_driver(virtio_pci_driver); |
| 834 | { | ||
| 835 | return pci_register_driver(&virtio_pci_driver); | ||
| 836 | } | ||
| 837 | |||
| 838 | module_init(virtio_pci_init); | ||
| 839 | |||
| 840 | static void __exit virtio_pci_exit(void) | ||
| 841 | { | ||
| 842 | pci_unregister_driver(&virtio_pci_driver); | ||
| 843 | } | ||
| 844 | |||
| 845 | module_exit(virtio_pci_exit); | ||
