From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
To: netdev@vger.kernel.org
Cc: linus.walleij@linaro.org, alsi@bang-olufsen.dk, andrew@lunn.ch,
f.fainelli@gmail.com, olteanv@gmail.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
arinc.unal@arinc9.com,
Luiz Angelo Daros de Luca <luizluca@gmail.com>
Subject: [PATCH net-next 5/7] net: dsa: realtek: merge interface modules into common
Date: Fri, 8 Dec 2023 01:41:41 -0300 [thread overview]
Message-ID: <20231208045054.27966-6-luizluca@gmail.com> (raw)
In-Reply-To: <20231208045054.27966-1-luizluca@gmail.com>
As both realtek-common and realtek-{smi,mdio} must always be loaded
together, we can save some resources merging them into a single module.
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
---
drivers/net/dsa/realtek/Kconfig | 4 ++--
drivers/net/dsa/realtek/Makefile | 8 +++++---
drivers/net/dsa/realtek/realtek-common.c | 1 +
drivers/net/dsa/realtek/realtek-mdio.c | 4 ----
drivers/net/dsa/realtek/realtek-smi.c | 4 ----
5 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/drivers/net/dsa/realtek/Kconfig b/drivers/net/dsa/realtek/Kconfig
index 9d182fde11b4..6989972eebc3 100644
--- a/drivers/net/dsa/realtek/Kconfig
+++ b/drivers/net/dsa/realtek/Kconfig
@@ -16,14 +16,14 @@ menuconfig NET_DSA_REALTEK
if NET_DSA_REALTEK
config NET_DSA_REALTEK_MDIO
- tristate "Realtek MDIO interface support"
+ bool "Realtek MDIO interface support"
depends on OF
help
Select to enable support for registering switches configured
through MDIO.
config NET_DSA_REALTEK_SMI
- tristate "Realtek SMI interface support"
+ bool "Realtek SMI interface support"
depends on OF
help
Select to enable support for registering switches connected
diff --git a/drivers/net/dsa/realtek/Makefile b/drivers/net/dsa/realtek/Makefile
index 5e0c1ef200a3..88f6652f9850 100644
--- a/drivers/net/dsa/realtek/Makefile
+++ b/drivers/net/dsa/realtek/Makefile
@@ -1,7 +1,9 @@
# SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_NET_DSA_REALTEK) += realtek-common.o
-obj-$(CONFIG_NET_DSA_REALTEK_MDIO) += realtek-mdio.o
-obj-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek-smi.o
+obj-$(CONFIG_NET_DSA_REALTEK) += realtek_common.o
+realtek_common-objs-y := realtek-common.o
+realtek_common-objs-$(CONFIG_NET_DSA_REALTEK_MDIO) += realtek-mdio.o
+realtek_common-objs-$(CONFIG_NET_DSA_REALTEK_SMI) += realtek-smi.o
+realtek_common-objs := $(realtek_common-objs-y)
obj-$(CONFIG_NET_DSA_REALTEK_RTL8366RB) += rtl8366.o
rtl8366-objs := rtl8366-core.o rtl8366rb.o
obj-$(CONFIG_NET_DSA_REALTEK_RTL8365MB) += rtl8365mb.o
diff --git a/drivers/net/dsa/realtek/realtek-common.c b/drivers/net/dsa/realtek/realtek-common.c
index 75b6aa071990..73c25d114dd3 100644
--- a/drivers/net/dsa/realtek/realtek-common.c
+++ b/drivers/net/dsa/realtek/realtek-common.c
@@ -132,5 +132,6 @@ void realtek_common_remove(struct realtek_priv *priv)
EXPORT_SYMBOL(realtek_common_remove);
MODULE_AUTHOR("Luiz Angelo Daros de Luca <luizluca@gmail.com>");
+MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");
MODULE_DESCRIPTION("Realtek DSA switches common module");
MODULE_LICENSE("GPL");
diff --git a/drivers/net/dsa/realtek/realtek-mdio.c b/drivers/net/dsa/realtek/realtek-mdio.c
index 4c9a744b72f8..bb5bff719ae9 100644
--- a/drivers/net/dsa/realtek/realtek-mdio.c
+++ b/drivers/net/dsa/realtek/realtek-mdio.c
@@ -168,7 +168,3 @@ void realtek_mdio_shutdown(struct mdio_device *mdiodev)
dev_set_drvdata(&mdiodev->dev, NULL);
}
EXPORT_SYMBOL_GPL(realtek_mdio_shutdown);
-
-MODULE_AUTHOR("Luiz Angelo Daros de Luca <luizluca@gmail.com>");
-MODULE_DESCRIPTION("Driver for Realtek ethernet switch connected via MDIO interface");
-MODULE_LICENSE("GPL");
diff --git a/drivers/net/dsa/realtek/realtek-smi.c b/drivers/net/dsa/realtek/realtek-smi.c
index 246024eec3bd..1ca2aa784d24 100644
--- a/drivers/net/dsa/realtek/realtek-smi.c
+++ b/drivers/net/dsa/realtek/realtek-smi.c
@@ -443,7 +443,3 @@ void realtek_smi_shutdown(struct platform_device *pdev)
platform_set_drvdata(pdev, NULL);
}
EXPORT_SYMBOL_GPL(realtek_smi_shutdown);
-
-MODULE_AUTHOR("Linus Walleij <linus.walleij@linaro.org>");
-MODULE_DESCRIPTION("Driver for Realtek ethernet switch connected via SMI interface");
-MODULE_LICENSE("GPL");
--
2.43.0
next prev parent reply other threads:[~2023-12-08 4:52 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-08 4:41 [PATCH net-next 0/7] net: dsa: realtek: variants to drivers, interfaces to a common module Luiz Angelo Daros de Luca
2023-12-08 4:41 ` [PATCH net-next 1/7] net: dsa: realtek: drop cleanup from realtek_priv Luiz Angelo Daros de Luca
2023-12-08 9:49 ` Alvin Šipraga
2023-12-08 4:41 ` [PATCH net-next 2/7] net: dsa: realtek: put of node after MDIO registration Luiz Angelo Daros de Luca
2023-12-08 5:13 ` Luiz Angelo Daros de Luca
2023-12-08 9:49 ` Alvin Šipraga
2023-12-08 18:05 ` Luiz Angelo Daros de Luca
2023-12-11 17:11 ` Vladimir Oltean
2023-12-12 3:47 ` Luiz Angelo Daros de Luca
2023-12-12 21:58 ` Vladimir Oltean
2023-12-13 4:37 ` Luiz Angelo Daros de Luca
2023-12-13 13:04 ` Vladimir Oltean
2023-12-16 4:26 ` Luiz Angelo Daros de Luca
2023-12-08 4:41 ` [PATCH net-next 3/7] net: dsa: realtek: convert variants into a real driver Luiz Angelo Daros de Luca
2023-12-08 10:23 ` Alvin Šipraga
2023-12-08 4:41 ` [PATCH net-next 4/7] net: dsa: realtek: create realtek-common Luiz Angelo Daros de Luca
2023-12-08 5:01 ` Luiz Angelo Daros de Luca
2023-12-08 10:52 ` Alvin Šipraga
2023-12-11 5:02 ` Luiz Angelo Daros de Luca
2023-12-11 9:44 ` Alvin Šipraga
2023-12-08 14:02 ` Alvin Šipraga
2023-12-11 5:02 ` Luiz Angelo Daros de Luca
2023-12-11 9:24 ` Alvin Šipraga
2023-12-11 17:19 ` Vladimir Oltean
2023-12-08 4:41 ` Luiz Angelo Daros de Luca [this message]
2023-12-08 10:57 ` [PATCH net-next 5/7] net: dsa: realtek: merge interface modules into common Alvin Šipraga
2023-12-11 5:13 ` Luiz Angelo Daros de Luca
2023-12-11 9:25 ` Alvin Šipraga
2023-12-08 4:41 ` [PATCH net-next 6/7] net: dsa: realtek: migrate user_mii setup to common Luiz Angelo Daros de Luca
2023-12-08 11:05 ` Alvin Šipraga
2023-12-11 5:16 ` Luiz Angelo Daros de Luca
2023-12-08 4:41 ` [PATCH net-next 7/7] net: dsa: realtek: always use the realtek user mdio driver Luiz Angelo Daros de Luca
2023-12-08 11:06 ` Alvin Šipraga
2023-12-11 5:29 ` Luiz Angelo Daros de Luca
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231208045054.27966-6-luizluca@gmail.com \
--to=luizluca@gmail.com \
--cc=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=arinc.unal@arinc9.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).