mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: ore@pengutronix.de, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH 3/9] net: dsa: rename dsa_ops to dsa_switch_ops
Date: Mon, 16 Jan 2023 14:44:55 +0100	[thread overview]
Message-ID: <20230116134501.2006391-4-a.fatoum@pengutronix.de> (raw)
In-Reply-To: <20230116134501.2006391-1-a.fatoum@pengutronix.de>

Linux calls the ops dsa_switch_ops and we have some members, which are
the same in both, so adopt the Linux naming.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 drivers/net/dsa.c     | 10 +++++-----
 drivers/net/ksz8873.c |  2 +-
 drivers/net/ksz9477.c |  2 +-
 drivers/net/sja1105.c |  2 +-
 include/dsa.h         |  4 ++--
 5 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/net/dsa.c b/drivers/net/dsa.c
index d633bdf15d5c..d51e9c861114 100644
--- a/drivers/net/dsa.c
+++ b/drivers/net/dsa.c
@@ -54,7 +54,7 @@ static int dsa_port_probe(struct eth_device *edev)
 {
 	struct dsa_port *dp = edev->priv;
 	struct dsa_switch *ds = dp->ds;
-	const struct dsa_ops *ops = ds->ops;
+	const struct dsa_switch_ops *ops = ds->ops;
 	phy_interface_t interface;
 	int ret;
 
@@ -86,7 +86,7 @@ static int dsa_port_start(struct eth_device *edev)
 {
 	struct dsa_port *dp = edev->priv;
 	struct dsa_switch *ds = dp->ds;
-	const struct dsa_ops *ops = ds->ops;
+	const struct dsa_switch_ops *ops = ds->ops;
 	phy_interface_t interface;
 	int ret;
 
@@ -147,7 +147,7 @@ static void dsa_port_stop(struct eth_device *edev)
 {
 	struct dsa_port *dp = edev->priv;
 	struct dsa_switch *ds = dp->ds;
-	const struct dsa_ops *ops = ds->ops;
+	const struct dsa_switch_ops *ops = ds->ops;
 
 	if (!dp->enabled)
 		return;
@@ -174,7 +174,7 @@ static int dsa_port_send(struct eth_device *edev, void *packet, int length)
 {
 	struct dsa_port *dp = edev->priv;
 	struct dsa_switch *ds = dp->ds;
-	const struct dsa_ops *ops = ds->ops;
+	const struct dsa_switch_ops *ops = ds->ops;
 	void *tx_buf = ds->tx_buf;
 	size_t full_length, stuff = 0;
 	int ret;
@@ -271,7 +271,7 @@ static int dsa_rx_preprocessor(struct eth_device *edev, unsigned char **packet,
 			       int *length)
 {
 	struct dsa_switch *ds = edev->rx_preprocessor_priv;
-	const struct dsa_ops *ops = ds->ops;
+	const struct dsa_switch_ops *ops = ds->ops;
 	struct dsa_port *dp;
 	int ret, port;
 
diff --git a/drivers/net/ksz8873.c b/drivers/net/ksz8873.c
index eb0a2a575962..3e3ad2413e9a 100644
--- a/drivers/net/ksz8873.c
+++ b/drivers/net/ksz8873.c
@@ -335,7 +335,7 @@ static int ksz8873_recv(struct dsa_switch *ds, int *port, void *packet,
 	return 0;
 };
 
-static const struct dsa_ops ksz8873_dsa_ops = {
+static const struct dsa_switch_ops ksz8873_dsa_ops = {
 	.port_enable = ksz8873_port_enable,
 	.xmit = ksz8873_xmit,
 	.rcv = ksz8873_recv,
diff --git a/drivers/net/ksz9477.c b/drivers/net/ksz9477.c
index af394554056c..0ca9dcc204ea 100644
--- a/drivers/net/ksz9477.c
+++ b/drivers/net/ksz9477.c
@@ -361,7 +361,7 @@ static int ksz_recv(struct dsa_switch *ds, int *port, void *packet, int length)
 	return 0;
 };
 
-static const struct dsa_ops ksz_dsa_ops = {
+static const struct dsa_switch_ops ksz_dsa_ops = {
 	.port_enable = ksz_port_enable,
 	.xmit = ksz_xmit,
 	.rcv = ksz_recv,
diff --git a/drivers/net/sja1105.c b/drivers/net/sja1105.c
index 595a002ff145..b85184ed92f4 100644
--- a/drivers/net/sja1105.c
+++ b/drivers/net/sja1105.c
@@ -2814,7 +2814,7 @@ static int sja1105_rcv(struct dsa_switch *ds, int *port, void *packet,
 	return 0;
 }
 
-static const struct dsa_ops sja1105_dsa_ops = {
+static const struct dsa_switch_ops sja1105_dsa_ops = {
 	.port_pre_enable	= sja1105_port_pre_enable,
 	.port_enable		= sja1105_port_enable,
 	.xmit			= sja1105_xmit,
diff --git a/include/dsa.h b/include/dsa.h
index 25821e114a51..3a170475cbb8 100644
--- a/include/dsa.h
+++ b/include/dsa.h
@@ -41,7 +41,7 @@
 struct dsa_port;
 struct dsa_switch;
 
-struct dsa_ops {
+struct dsa_switch_ops {
 	int (*port_probe)(struct dsa_port *dp, int port,
 			  phy_interface_t phy_mode);
 	int (*port_pre_enable)(struct dsa_port *dp, int port,
@@ -69,7 +69,7 @@ struct dsa_port {
 
 struct dsa_switch {
 	struct device *dev;
-	const struct dsa_ops *ops;
+	const struct dsa_switch_ops *ops;
 	size_t num_ports;
 	u32 cpu_port;
 	int cpu_port_users;
-- 
2.30.2




  parent reply	other threads:[~2023-01-16 13:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-16 13:44 [PATCH 0/9] net: dsa: add Realtek (rtl8365mb/rtl8366rb) switch support Ahmad Fatoum
2023-01-16 13:44 ` [PATCH 1/9] driver: alias of_match_ptr and DRV_OF_COMPAT Ahmad Fatoum
2023-01-16 13:44 ` [PATCH 2/9] gpiolib: implement gpio_direction_input/output Ahmad Fatoum
2023-01-16 13:44 ` Ahmad Fatoum [this message]
2023-01-16 13:44 ` [PATCH 4/9] net: dsa: factor out dsa_port_alloc helper Ahmad Fatoum
2023-01-16 13:44 ` [PATCH 5/9] net: dsa: populate struct dsa_port::index/dev members Ahmad Fatoum
2023-01-16 13:44 ` [PATCH 6/9] net: dsa: always call port_pre_enable before port_enable Ahmad Fatoum
2023-01-16 13:44 ` [PATCH 7/9] net: dsa: add some helpers to ease porting kernel drivers Ahmad Fatoum
2023-01-16 13:45 ` [PATCH 8/9] net: dsa: add struct dsa_switch::priv member for driver use Ahmad Fatoum
2023-01-16 13:45 ` [PATCH 9/9] net: dsa: add Realtek (rtl8365mb/rtl8366rb) switch support Ahmad Fatoum
2023-01-23  8:21 ` [PATCH 0/9] " Sascha Hauer

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=20230116134501.2006391-4-a.fatoum@pengutronix.de \
    --to=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=ore@pengutronix.de \
    /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