[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240930180036.87598-3-rosenp@gmail.com>
Date: Mon, 30 Sep 2024 11:00:25 -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,
jacob.e.keller@...el.com,
horms@...nel.org,
sd@...asysnail.net,
chunkeey@...il.com
Subject: [PATCH net-next 02/13] net: ibm: emac: use module_platform_driver for modules
These init and exit functions don't do anything special. Just macro it
away.
Signed-off-by: Rosen Penev <rosenp@...il.com>
---
drivers/net/ethernet/ibm/emac/mal.c | 10 +---------
drivers/net/ethernet/ibm/emac/rgmii.c | 10 +---------
drivers/net/ethernet/ibm/emac/tah.c | 10 +---------
drivers/net/ethernet/ibm/emac/zmii.c | 10 +---------
4 files changed, 4 insertions(+), 36 deletions(-)
diff --git a/drivers/net/ethernet/ibm/emac/mal.c b/drivers/net/ethernet/ibm/emac/mal.c
index d92dd9c83031..a632d3a207d3 100644
--- a/drivers/net/ethernet/ibm/emac/mal.c
+++ b/drivers/net/ethernet/ibm/emac/mal.c
@@ -779,12 +779,4 @@ static struct platform_driver mal_of_driver = {
.remove_new = mal_remove,
};
-int __init mal_init(void)
-{
- return platform_driver_register(&mal_of_driver);
-}
-
-void mal_exit(void)
-{
- platform_driver_unregister(&mal_of_driver);
-}
+module_platform_driver(mal_of_driver);
diff --git a/drivers/net/ethernet/ibm/emac/rgmii.c b/drivers/net/ethernet/ibm/emac/rgmii.c
index e1712fdc3c31..52f080661f87 100644
--- a/drivers/net/ethernet/ibm/emac/rgmii.c
+++ b/drivers/net/ethernet/ibm/emac/rgmii.c
@@ -303,12 +303,4 @@ static struct platform_driver rgmii_driver = {
.remove_new = rgmii_remove,
};
-int __init rgmii_init(void)
-{
- return platform_driver_register(&rgmii_driver);
-}
-
-void rgmii_exit(void)
-{
- platform_driver_unregister(&rgmii_driver);
-}
+module_platform_driver(rgmii_driver);
diff --git a/drivers/net/ethernet/ibm/emac/tah.c b/drivers/net/ethernet/ibm/emac/tah.c
index fa3488258ca2..8407ff83b1d3 100644
--- a/drivers/net/ethernet/ibm/emac/tah.c
+++ b/drivers/net/ethernet/ibm/emac/tah.c
@@ -161,12 +161,4 @@ static struct platform_driver tah_driver = {
.remove_new = tah_remove,
};
-int __init tah_init(void)
-{
- return platform_driver_register(&tah_driver);
-}
-
-void tah_exit(void)
-{
- platform_driver_unregister(&tah_driver);
-}
+module_platform_driver(tah_driver);
diff --git a/drivers/net/ethernet/ibm/emac/zmii.c b/drivers/net/ethernet/ibm/emac/zmii.c
index 26e86cdee2f6..97cea64abe55 100644
--- a/drivers/net/ethernet/ibm/emac/zmii.c
+++ b/drivers/net/ethernet/ibm/emac/zmii.c
@@ -309,12 +309,4 @@ static struct platform_driver zmii_driver = {
.remove_new = zmii_remove,
};
-int __init zmii_init(void)
-{
- return platform_driver_register(&zmii_driver);
-}
-
-void zmii_exit(void)
-{
- platform_driver_unregister(&zmii_driver);
-}
+module_platform_driver(zmii_driver);
--
2.46.2
Powered by blists - more mailing lists