summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/lan9303-core.c
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-12-06 18:57:53 +0200
committerJakub Kicinski <kuba@kernel.org>2021-12-08 14:31:15 -0800
commit41fb0cf1bced59c1fe178cf6cc9f716b5da9e40e (patch)
tree7cb05115b0a0269d3d88d41a7cac4d4d81e903c7 /drivers/net/dsa/lan9303-core.c
parent36cbf39b56908bb2e7e8e392e5f08895c3ca4326 (diff)
downloadlinux-next-41fb0cf1bced59c1fe178cf6cc9f716b5da9e40e.tar.gz
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 <vladimir.oltean@nxp.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
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() */
}