summaryrefslogtreecommitdiffstats
path: root/include/net/dsa.h
diff options
context:
space:
mode:
authorFlorian Fainelli2017-01-08 23:52:08 +0100
committerDavid S. Miller2017-01-09 21:44:50 +0100
commita82f67afe8e297834bedafa529941d9d0808caf8 (patch)
tree4e47358cacf8e32212e27b6d78f4d184e2799982 /include/net/dsa.h
parentnet: dsa: Encapsulate legacy switch drivers into dsa_switch_driver (diff)
downloadkernel-qcow2-linux-a82f67afe8e297834bedafa529941d9d0808caf8.tar.gz
kernel-qcow2-linux-a82f67afe8e297834bedafa529941d9d0808caf8.tar.xz
kernel-qcow2-linux-a82f67afe8e297834bedafa529941d9d0808caf8.zip
net: dsa: Make dsa_switch_ops const
Now that we have properly encapsulated and made drivers utilize exported functions, we can switch dsa_switch_ops to be a annotated with const. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/dsa.h')
-rw-r--r--include/net/dsa.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/dsa.h b/include/net/dsa.h
index edfa9b130953..b94d1f2ef912 100644
--- a/include/net/dsa.h
+++ b/include/net/dsa.h
@@ -169,7 +169,7 @@ struct dsa_switch {
/*
* The switch operations.
*/
- struct dsa_switch_ops *ops;
+ const struct dsa_switch_ops *ops;
/*
* An array of which element [a] indicates which port on this
@@ -390,7 +390,7 @@ struct dsa_switch_ops {
struct dsa_switch_driver {
struct list_head list;
- struct dsa_switch_ops *ops;
+ const struct dsa_switch_ops *ops;
};
void register_switch_driver(struct dsa_switch_driver *type);