aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/lan9303-core.c
diff options
context:
space:
mode:
authorVladimir Oltean <[email protected]>2021-12-06 16:57:53 +0000
committerJakub Kicinski <[email protected]>2021-12-08 22:31:15 +0000
commit41fb0cf1bced59c1fe178cf6cc9f716b5da9e40e (patch)
tree7cb05115b0a0269d3d88d41a7cac4d4d81e903c7 /drivers/net/dsa/lan9303-core.c
parentnet: dsa: hide dp->bridge_dev and dp->bridge_num in the core behind helpers (diff)
downloadkernel-41fb0cf1bced59c1fe178cf6cc9f716b5da9e40e.tar.gz
kernel-41fb0cf1bced59c1fe178cf6cc9f716b5da9e40e.zip
net: dsa: hide dp->bridge_dev and dp->bridge_num in drivers behind helpers
The location of the bridge device pointer and number is going to change. It is not going to be kept individually per port, but in a common structure allocated dynamically and which will have lockdep validation. Use the helpers to access these elements so that we have a migration path to the new organization. Signed-off-by: Vladimir Oltean <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/dsa/lan9303-core.c')
-rw-r--r--drivers/net/dsa/lan9303-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index 89f920289ae2..1c2bdcde6979 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -1108,7 +1108,7 @@ static int lan9303_port_bridge_join(struct dsa_switch *ds, int port,
struct lan9303 *chip = ds->priv;
dev_dbg(chip->dev, "%s(port %d)\n", __func__, port);
- if (dsa_to_port(ds, 1)->bridge_dev == dsa_to_port(ds, 2)->bridge_dev) {
+ if (dsa_port_bridge_same(dsa_to_port(ds, 1), dsa_to_port(ds, 2))) {
lan9303_bridge_ports(chip);
chip->is_bridged = true; /* unleash stp_state_set() */
}