ar8216: define all switch_addr structs as const
authorJohn Crispin <john@openwrt.org>
Sat, 17 Jan 2015 14:24:40 +0000 (14:24 +0000)
committerJohn Crispin <john@openwrt.org>
Sat, 17 Jan 2015 14:24:40 +0000 (14:24 +0000)
Define all switch_addr structs as const.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
SVN-Revision: 44002

target/linux/generic/files/drivers/net/phy/ar8216.c
target/linux/generic/files/drivers/net/phy/ar8327.c

index b88e9ec45974e2acaec7cc17ec428ed7a406f5d0..906dc7ac15be11bd159931660e5488cef3f6f8c7 100644 (file)
@@ -1277,7 +1277,7 @@ unlock:
        return ret;
 }
 
-static struct switch_attr ar8xxx_sw_attr_globals[] = {
+static const struct switch_attr ar8xxx_sw_attr_globals[] = {
        {
                .type = SWITCH_TYPE_INT,
                .name = "enable_vlan",
@@ -1326,7 +1326,7 @@ static struct switch_attr ar8xxx_sw_attr_globals[] = {
        },
 };
 
-struct switch_attr ar8xxx_sw_attr_port[2] = {
+const struct switch_attr ar8xxx_sw_attr_port[2] = {
        {
                .type = SWITCH_TYPE_NOVAL,
                .name = "reset_mib",
@@ -1342,7 +1342,7 @@ struct switch_attr ar8xxx_sw_attr_port[2] = {
        },
 };
 
-struct switch_attr ar8xxx_sw_attr_vlan[1] = {
+const struct switch_attr ar8xxx_sw_attr_vlan[1] = {
        {
                .type = SWITCH_TYPE_INT,
                .name = "vid",
index 77ee4bf809b762e7ea2a8407507ab0bdb8cd62c4..38c11cb59ad9a071d3f55ffdd7dec12de59c9d4d 100644 (file)
@@ -30,8 +30,8 @@
 #include "ar8327.h"
 
 extern const struct ar8xxx_mib_desc ar8236_mibs[39];
-extern struct switch_attr ar8xxx_sw_attr_port[2];
-extern struct switch_attr ar8xxx_sw_attr_vlan[1];
+extern const struct switch_attr ar8xxx_sw_attr_port[2];
+extern const struct switch_attr ar8xxx_sw_attr_vlan[1];
 
 static u32
 ar8327_get_pad_cfg(struct ar8327_pad_cfg *cfg)
@@ -896,7 +896,7 @@ ar8327_set_mirror_regs(struct ar8xxx_priv *priv)
                           AR8327_PORT_HOL_CTRL1_EG_MIRROR_EN);
 }
 
-static struct switch_attr ar8327_sw_attr_globals[] = {
+static const struct switch_attr ar8327_sw_attr_globals[] = {
        {
                .type = SWITCH_TYPE_INT,
                .name = "enable_vlan",