summaryrefslogtreecommitdiff
path: root/drivers/net/dsa/xrs700x
diff options
context:
space:
mode:
authorVladimir Oltean <vladimir.oltean@nxp.com>2021-12-06 19:57:53 +0300
committerJakub Kicinski <kuba@kernel.org>2021-12-09 01:31:15 +0300
commit41fb0cf1bced59c1fe178cf6cc9f716b5da9e40e (patch)
tree7cb05115b0a0269d3d88d41a7cac4d4d81e903c7 /drivers/net/dsa/xrs700x
parent36cbf39b56908bb2e7e8e392e5f08895c3ca4326 (diff)
downloadlinux-41fb0cf1bced59c1fe178cf6cc9f716b5da9e40e.tar.xz
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/xrs700x')
-rw-r--r--drivers/net/dsa/xrs700x/xrs700x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/dsa/xrs700x/xrs700x.c b/drivers/net/dsa/xrs700x/xrs700x.c
index 910fcb3b252b..7c2b6c32242d 100644
--- a/drivers/net/dsa/xrs700x/xrs700x.c
+++ b/drivers/net/dsa/xrs700x/xrs700x.c
@@ -513,14 +513,14 @@ static int xrs700x_bridge_common(struct dsa_switch *ds, int port,
cpu_mask |= BIT(i);
- if (dsa_to_port(ds, i)->bridge_dev == bridge)
+ if (dsa_port_bridge_dev_get(dsa_to_port(ds, i)) == bridge)
continue;
mask |= BIT(i);
}
for (i = 0; i < ds->num_ports; i++) {
- if (dsa_to_port(ds, i)->bridge_dev != bridge)
+ if (dsa_port_bridge_dev_get(dsa_to_port(ds, i)) != bridge)
continue;
/* 1 = Disable forwarding to the port */