hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/pci/pci-pf-stub.c
....@@ -1,7 +1,7 @@
11 // SPDX-License-Identifier: GPL-2.0
22 /* pci-pf-stub - simple stub driver for PCI SR-IOV PF device
33 *
4
- * This driver is meant to act as a "whitelist" for devices that provde
4
+ * This driver is meant to act as a "whitelist" for devices that provide
55 * SR-IOV functionality while at the same time not actually needing a
66 * driver of their own.
77 */
....@@ -9,7 +9,7 @@
99 #include <linux/module.h>
1010 #include <linux/pci.h>
1111
12
-/**
12
+/*
1313 * pci_pf_stub_whitelist - White list of devices to bind pci-pf-stub onto
1414 *
1515 * This table provides the list of IDs this driver is supposed to bind
....@@ -37,18 +37,6 @@
3737 .probe = pci_pf_stub_probe,
3838 .sriov_configure = pci_sriov_configure_simple,
3939 };
40
-
41
-static int __init pci_pf_stub_init(void)
42
-{
43
- return pci_register_driver(&pf_stub_driver);
44
-}
45
-
46
-static void __exit pci_pf_stub_exit(void)
47
-{
48
- pci_unregister_driver(&pf_stub_driver);
49
-}
50
-
51
-module_init(pci_pf_stub_init);
52
-module_exit(pci_pf_stub_exit);
40
+module_pci_driver(pf_stub_driver);
5341
5442 MODULE_LICENSE("GPL");