projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e7a7499
)
PCI/IOV: Simplify pci-pf-stub with module_pci_driver()
author
Liu Shixin
<liushixin2@huawei.com>
Thu, 17 Sep 2020 07:10:42 +0000
(15:10 +0800)
committer
Bjorn Helgaas
<bhelgaas@google.com>
Thu, 17 Sep 2020 17:40:20 +0000
(12:40 -0500)
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>
drivers/pci/pci-pf-stub.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/pci/pci-pf-stub.c
b/drivers/pci/pci-pf-stub.c
index a0b2bd6c918a07165c7f0298dd5281c40b94e0c9..45855a5e9fcae7961ea3f2c8d96baeeb0dba7e7d 100644
(file)
--- 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");