[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240930202434.296960-9-rosenp@gmail.com>
Date: Mon, 30 Sep 2024 13:24:33 -0700
From: Rosen Penev <rosenp@...il.com>
To: netdev@...r.kernel.org
Cc: andrew@...n.ch,
davem@...emloft.net,
edumazet@...gle.com,
kuba@...nel.org,
pabeni@...hat.com,
linux-kernel@...r.kernel.org,
olek2@...pl,
shannon.nelson@....com
Subject: [PATCH net-next 8/9] net: lantiq_etop: use module_platform_driver_probe
The explicit init and exit functions don't do anything special. Just use
the macro.
Signed-off-by: Rosen Penev <rosenp@...il.com>
---
drivers/net/ethernet/lantiq_etop.c | 19 +------------------
1 file changed, 1 insertion(+), 18 deletions(-)
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 0cb5d536f351..4d8534092667 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -686,24 +686,7 @@ static struct platform_driver ltq_mii_driver = {
},
};
-static int __init
-init_ltq_etop(void)
-{
- int ret = platform_driver_probe(<q_mii_driver, ltq_etop_probe);
-
- if (ret)
- pr_err("ltq_etop: Error registering platform driver!");
- return ret;
-}
-
-static void __exit
-exit_ltq_etop(void)
-{
- platform_driver_unregister(<q_mii_driver);
-}
-
-module_init(init_ltq_etop);
-module_exit(exit_ltq_etop);
+module_platform_driver_probe(<q_mii_driver, ltq_etop_probe);
MODULE_AUTHOR("John Crispin <blogic@...nwrt.org>");
MODULE_DESCRIPTION("Lantiq SoC ETOP");
--
2.46.2
Powered by blists - more mailing lists