diff mbox series

qtnfmac_pcie: Use module_pci_driver

Message ID 20201221075735.197255-1-ameynarkhede03@gmail.com
State New
Headers show
Series qtnfmac_pcie: Use module_pci_driver | expand

Commit Message

Amey Narkhede Dec. 21, 2020, 7:57 a.m. UTC
Use module_pci_driver for drivers whose init and exit functions
only register and unregister, respectively.

Signed-off-by: Amey Narkhede <ameynarkhede03@gmail.com>
---
 drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

--
2.29.2

Comments

Kalle Valo Jan. 14, 2021, 5:31 p.m. UTC | #1
Amey Narkhede <ameynarkhede03@gmail.com> wrote:

> Use module_pci_driver for drivers whose init and exit functions
> only register and unregister, respectively.
> 
> Signed-off-by: Amey Narkhede <ameynarkhede03@gmail.com>

Patch applied to wireless-drivers-next.git, thanks.

0924ba9fbc26 qtnfmac_pcie: Use module_pci_driver
diff mbox series

Patch

diff --git a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
index 5337e67092ca..d9d06af9adc6 100644
--- a/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
+++ b/drivers/net/wireless/quantenna/qtnfmac/pcie/pcie.c
@@ -480,18 +480,7 @@  static struct pci_driver qtnf_pcie_drv_data = {
 #endif
 };

-static int __init qtnf_pcie_register(void)
-{
-	return pci_register_driver(&qtnf_pcie_drv_data);
-}
-
-static void __exit qtnf_pcie_exit(void)
-{
-	pci_unregister_driver(&qtnf_pcie_drv_data);
-}
-
-module_init(qtnf_pcie_register);
-module_exit(qtnf_pcie_exit);
+module_pci_driver(qtnf_pcie_drv_data)

 MODULE_AUTHOR("Quantenna Communications");
 MODULE_DESCRIPTION("Quantenna PCIe bus driver for 802.11 wireless LAN.");