diff mbox

[3/3] net: dsa: mt7530: constify dsa_switch_ops

Message ID 1503483419-21780-4-git-send-email-arvind.yadav.cs@gmail.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Arvind Yadav Aug. 23, 2017, 10:16 a.m. UTC
dsa_switch_ops are not supposed to change at runtime. All functions
working with dsa_switch_ops provided by <net/dsa.h> work with
const dsa_switch_ops. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/net/dsa/mt7530.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c
index 264b281..77ae576 100644
--- a/drivers/net/dsa/mt7530.c
+++ b/drivers/net/dsa/mt7530.c
@@ -1039,7 +1039,7 @@  static void mt7530_adjust_link(struct dsa_switch *ds, int port,
 	return 0;
 }
 
-static struct dsa_switch_ops mt7530_switch_ops = {
+static const struct dsa_switch_ops mt7530_switch_ops = {
 	.get_tag_protocol	= mtk_get_tag_protocol,
 	.setup			= mt7530_setup,
 	.get_strings		= mt7530_get_strings,