net: dsa: qca8k: drop dsa_switch_ops from qca8k_priv
authorAnsuel Smith <ansuelsmth@gmail.com>
Fri, 15 Apr 2022 23:30:15 +0000 (01:30 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Apr 2022 12:28:29 +0000 (13:28 +0100)
Now that dsa_switch_ops is not switch specific anymore, we can drop it
from qca8k_priv and use the static ops directly for the dsa_switch
pointer.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c
drivers/net/dsa/qca8k.h

index 24d5708..ef8d686 100644 (file)
@@ -3157,8 +3157,7 @@ qca8k_sw_probe(struct mdio_device *mdiodev)
        priv->ds->dev = &mdiodev->dev;
        priv->ds->num_ports = QCA8K_NUM_PORTS;
        priv->ds->priv = priv;
-       priv->ops = qca8k_switch_ops;
-       priv->ds->ops = &priv->ops;
+       priv->ds->ops = &qca8k_switch_ops;
        mutex_init(&priv->reg_mutex);
        dev_set_drvdata(&mdiodev->dev, priv);
 
index 8bbe36f..04408e1 100644 (file)
@@ -394,7 +394,6 @@ struct qca8k_priv {
        struct dsa_switch *ds;
        struct mutex reg_mutex;
        struct device *dev;
-       struct dsa_switch_ops ops;
        struct gpio_desc *reset_gpio;
        struct net_device *mgmt_master; /* Track if mdio/mib Ethernet is available */
        struct qca8k_mgmt_eth_data mgmt_eth_data;