diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2017-01-26 13:45:52 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-01-26 15:43:53 -0500 |
commit | 293784a8f856e854b4742be4aacf435062d91e9c (patch) | |
tree | 1fa42ba1ef912b78e184e5bbddc046ae8d0df2e8 /net/dsa/dsa_priv.h | |
parent | 55ed0ce0898e15fec30d2ca2a563d7934b082375 (diff) |
net: dsa: Make most functions take a dsa_port argument
In preparation for allowing platform data, and therefore no valid
device_node pointer, make most DSA functions takes a pointer to a
dsa_port structure whenever possible. While at it, introduce a
dsa_port_is_valid() helper function which checks whether port->dn is
NULL or not at the moment.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.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.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dsa/dsa_priv.h b/net/dsa/dsa_priv.h index 63ae1484abae..16194a4bb2fe 100644 --- a/net/dsa/dsa_priv.h +++ b/net/dsa/dsa_priv.h | |||
@@ -50,8 +50,8 @@ struct dsa_slave_priv { | |||
50 | 50 | ||
51 | /* dsa.c */ | 51 | /* dsa.c */ |
52 | int dsa_cpu_dsa_setup(struct dsa_switch *ds, struct device *dev, | 52 | int dsa_cpu_dsa_setup(struct dsa_switch *ds, struct device *dev, |
53 | struct device_node *port_dn, int port); | 53 | struct dsa_port *dport, int port); |
54 | void dsa_cpu_dsa_destroy(struct device_node *port_dn); | 54 | void dsa_cpu_dsa_destroy(struct dsa_port *dport); |
55 | const struct dsa_device_ops *dsa_resolve_tag_protocol(int tag_protocol); | 55 | const struct dsa_device_ops *dsa_resolve_tag_protocol(int tag_protocol); |
56 | int dsa_cpu_port_ethtool_setup(struct dsa_switch *ds); | 56 | int dsa_cpu_port_ethtool_setup(struct dsa_switch *ds); |
57 | void dsa_cpu_port_ethtool_restore(struct dsa_switch *ds); | 57 | void dsa_cpu_port_ethtool_restore(struct dsa_switch *ds); |