]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
tulip: de2104x: use module_pci_driver to simplify the code
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 7 Apr 2021 15:07:08 +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/de2104x.c

index c3cbe55205a7bca96b5c743180bfb18ed16447a0..b018195f0243f0d8b32632746d1ad439f9821ef4 100644 (file)
@@ -2193,15 +2193,4 @@ static struct pci_driver de_driver = {
        .driver.pm      = &de_pm_ops,
 };
 
-static int __init de_init (void)
-{
-       return pci_register_driver(&de_driver);
-}
-
-static void __exit de_exit (void)
-{
-       pci_unregister_driver (&de_driver);
-}
-
-module_init(de_init);
-module_exit(de_exit);
+module_pci_driver(de_driver);