net: dsa: make dsa_switch_ops const

Make these structures const as they are only stored in the ops field of
a dsa_switch structure, which is const.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
这个提交包含在:
Bhumika Goyal
2017-08-09 10:34:15 +05:30
提交者 David S. Miller
父节点 42013e9038
当前提交 d78d6776bc
修改 3 个文件,包含 3 行新增3 行删除

查看文件

@@ -1017,7 +1017,7 @@ mt7530_setup(struct dsa_switch *ds)
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,