summaryrefslogtreecommitdiff
path: root/net/dsa/dsa2.c
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2019-04-28 19:37:19 +0200
committerDavid S. Miller <davem@davemloft.net>2019-04-28 19:41:01 -0400
commit4dad81ee14479c74973ee669612a367b3a675743 (patch)
treedeb8e24e0569d3e3d5e320f8fc159a5ca019235a /net/dsa/dsa2.c
parentc39e2a1d71ade2e59c92280fb2b4daf06b0e240f (diff)
dsa: Add stub tag driver put method
When a DSA switch driver is unloaded, the lock on the tag driver should be released so the module can be unloaded. Add the needed calls, but leave the actual release code as a stub. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> v2 Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa2.c')
-rw-r--r--net/dsa/dsa2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c
index ba91bda8bdd3..bbc9f56e89b9 100644
--- a/net/dsa/dsa2.c
+++ b/net/dsa/dsa2.c
@@ -335,6 +335,8 @@ static void dsa_port_teardown(struct dsa_port *dp)
case DSA_PORT_TYPE_UNUSED:
break;
case DSA_PORT_TYPE_CPU:
+ dsa_tag_driver_put(dp->tag_ops);
+ /* fall-through */
case DSA_PORT_TYPE_DSA:
dsa_port_link_unregister_of(dp);
break;