Commit 462bd2fd authored by Liu Shixin's avatar Liu Shixin Committed by Bjorn Helgaas

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.comSigned-off-by: default avatarLiu Shixin <liushixin2@huawei.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarAlexander Duyck <alexander.h.duyck@linux.intel.com>
parent e7a7499d
......@@ -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");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment