kernel: bump 5.15 to 5.15.116
[openwrt/openwrt.git] / target / linux / generic / backport-5.15 / 769-v5.19-04-net-dsa-qca8k-drop-dsa_switch_ops-from-qca8k_priv.patch
1 From 2349b83a2486c55b9dd225326f0172a84a43c5e4 Mon Sep 17 00:00:00 2001
2 From: Ansuel Smith <ansuelsmth@gmail.com>
3 Date: Sat, 16 Apr 2022 01:30:15 +0200
4 Subject: [PATCH 4/6] net: dsa: qca8k: drop dsa_switch_ops from qca8k_priv
5
6 Now that dsa_switch_ops is not switch specific anymore, we can drop it
7 from qca8k_priv and use the static ops directly for the dsa_switch
8 pointer.
9
10 Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
11 Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
13 ---
14 drivers/net/dsa/qca8k.c | 3 +--
15 drivers/net/dsa/qca8k.h | 1 -
16 2 files changed, 1 insertion(+), 3 deletions(-)
17
18 --- a/drivers/net/dsa/qca8k.c
19 +++ b/drivers/net/dsa/qca8k.c
20 @@ -3121,8 +3121,7 @@ qca8k_sw_probe(struct mdio_device *mdiod
21 priv->ds->dev = &mdiodev->dev;
22 priv->ds->num_ports = QCA8K_NUM_PORTS;
23 priv->ds->priv = priv;
24 - priv->ops = qca8k_switch_ops;
25 - priv->ds->ops = &priv->ops;
26 + priv->ds->ops = &qca8k_switch_ops;
27 mutex_init(&priv->reg_mutex);
28 dev_set_drvdata(&mdiodev->dev, priv);
29
30 --- a/drivers/net/dsa/qca8k.h
31 +++ b/drivers/net/dsa/qca8k.h
32 @@ -388,7 +388,6 @@ struct qca8k_priv {
33 struct dsa_switch *ds;
34 struct mutex reg_mutex;
35 struct device *dev;
36 - struct dsa_switch_ops ops;
37 struct gpio_desc *reset_gpio;
38 struct net_device *mgmt_master; /* Track if mdio/mib Ethernet is available */
39 struct qca8k_mgmt_eth_data mgmt_eth_data;