]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Simplify the code by using module_platform_driver macro
authorZhichao Cai <caizhichao@yulong.com>
Wed, 24 Mar 2021 02:30:47 +0000 (10:30 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Mar 2021 00:50:36 +0000 (17:50 -0700)
for ftmac100

Signed-off-by: Zhichao Cai <caizhichao@yulong.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/faraday/ftmac100.c

index 473b337b2e3baaa946c68a56cd29eeb6867538f1..5a1a8f2ea63c3f2557c1b798c6ce271521099358 100644 (file)
@@ -1177,18 +1177,7 @@ static struct platform_driver ftmac100_driver = {
 /******************************************************************************
  * initialization / finalization
  *****************************************************************************/
-static int __init ftmac100_init(void)
-{
-       return platform_driver_register(&ftmac100_driver);
-}
-
-static void __exit ftmac100_exit(void)
-{
-       platform_driver_unregister(&ftmac100_driver);
-}
-
-module_init(ftmac100_init);
-module_exit(ftmac100_exit);
+module_platform_driver(ftmac100_driver);
 
 MODULE_AUTHOR("Po-Yu Chuang <ratbert@faraday-tech.com>");
 MODULE_DESCRIPTION("FTMAC100 driver");