diff options
author | Liu Shixin <liushixin2@huawei.com> | 2020-09-17 10:10:42 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2020-09-17 20:40:20 +0300 |
commit | 462bd2fdf56ab2af50d1b483f6783a5a30562e02 (patch) | |
tree | 25ef131c31af4084c7f62d9027dd8dedc407762d /drivers/pci/pci-pf-stub.c | |
parent | e7a7499d841bfc9c7a4443f0fd7a04ae49bdbdd3 (diff) | |
download | linux-462bd2fdf56ab2af50d1b483f6783a5a30562e02.tar.xz |
PCI/IOV: Simplify pci-pf-stub with module_pci_driver()
Use the module_pci_driver() macro to make the code simpler by eliminating
module_init() and module_exit() calls.
Link: https://lore.kernel.org/r/20200917071042.1909191-1-liushixin2@huawei.com
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Diffstat (limited to 'drivers/pci/pci-pf-stub.c')
-rw-r--r-- | drivers/pci/pci-pf-stub.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/pci/pci-pf-stub.c b/drivers/pci/pci-pf-stub.c index a0b2bd6c918a..45855a5e9fca 100644 --- a/drivers/pci/pci-pf-stub.c +++ b/drivers/pci/pci-pf-stub.c @@ -37,18 +37,6 @@ static struct pci_driver pf_stub_driver = { .probe = pci_pf_stub_probe, .sriov_configure = pci_sriov_configure_simple, }; - -static int __init pci_pf_stub_init(void) -{ - return pci_register_driver(&pf_stub_driver); -} - -static void __exit pci_pf_stub_exit(void) -{ - pci_unregister_driver(&pf_stub_driver); -} - -module_init(pci_pf_stub_init); -module_exit(pci_pf_stub_exit); +module_pci_driver(pf_stub_driver); MODULE_LICENSE("GPL"); |