]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
tulip: windbond-840: use module_pci_driver to simplify the code
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 7 Apr 2021 15:07:07 +0000 (15:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Apr 2021 22:15:01 +0000 (15:15 -0700)
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/dec/tulip/winbond-840.c

index 89cbdc1f48574225c3aa77acd4d6b3f7ee068eed..514df170ec5df8aaf925dd98129b4611a8e4bdf6 100644 (file)
@@ -1629,15 +1629,4 @@ static struct pci_driver w840_driver = {
        .driver.pm      = &w840_pm_ops,
 };
 
-static int __init w840_init(void)
-{
-       return pci_register_driver(&w840_driver);
-}
-
-static void __exit w840_exit(void)
-{
-       pci_unregister_driver(&w840_driver);
-}
-
-module_init(w840_init);
-module_exit(w840_exit);
+module_pci_driver(w840_driver);