aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa_priv.h
diff options
context:
space:
mode:
authorAndrew Lunn <andrew@lunn.ch>2016-06-04 21:17:01 +0200
committerDavid S. Miller <davem@davemloft.net>2016-06-04 14:29:53 -0700
commit9b8e895c4e9d217dfa0e48aafa072258e2a3480e (patch)
tree4f64692e9a032093e5024c5f65c94e427afd9d03 /net/dsa/dsa_priv.h
parentnet: dsa: Copy the routing table into the switch structure (diff)
downloadlinux-dev-9b8e895c4e9d217dfa0e48aafa072258e2a3480e.tar.xz
linux-dev-9b8e895c4e9d217dfa0e48aafa072258e2a3480e.zip
net: dsa: Split up creating/destroying of DSA and CPU ports
Refactor the code to setup a single DSA/CPU port into a function of its own, and export it, so it can be used by the new binding. Similarly, refactor the destroy code into a function. When destroying the ports, don't put the of node. They should be released at the end along with the normal ports. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa_priv.h')
-rw-r--r--net/dsa/dsa_priv.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h
index dfa33779d49c..dbea5d9e7f75 100644
--- a/net/dsa/dsa_priv.h
+++ b/net/dsa/dsa_priv.h
@@ -50,6 +50,9 @@ struct dsa_slave_priv {
/* dsa.c */
extern char dsa_driver_version[];
+int dsa_cpu_dsa_setup(struct dsa_switch *ds, struct device *dev,
+ struct device_node *port_dn, int port);
+void dsa_cpu_dsa_destroy(struct device_node *port_dn);
/* slave.c */
extern const struct dsa_device_ops notag_netdev_ops;