[PATCH 3/9] net: dsa: rename dsa_ops to dsa_switch_ops

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Jan 16 05:44:55 PST 2023


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 at 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




More information about the barebox mailing list