]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
bridge: make port attributes const
authorstephen hemminger <shemminger@vyatta.com>
Mon, 30 Jul 2012 08:55:49 +0000 (08:55 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 30 Jul 2012 21:53:22 +0000 (14:53 -0700)
Simple table that can be marked const.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_sysfs_if.c

index 6229b62749e83a9dbf8469f7b427f46133b868db..13b36bdc76a79f19d48ac3ad35b460dfb77e5e8e 100644 (file)
@@ -27,7 +27,7 @@ struct brport_attribute {
 };
 
 #define BRPORT_ATTR(_name,_mode,_show,_store)                  \
-struct brport_attribute brport_attr_##_name = {                \
+const struct brport_attribute brport_attr_##_name = {          \
        .attr = {.name = __stringify(_name),                    \
                 .mode = _mode },                               \
        .show   = _show,                                        \
@@ -164,7 +164,7 @@ static BRPORT_ATTR(multicast_router, S_IRUGO | S_IWUSR, show_multicast_router,
                   store_multicast_router);
 #endif
 
-static struct brport_attribute *brport_attrs[] = {
+static const struct brport_attribute *brport_attrs[] = {
        &brport_attr_path_cost,
        &brport_attr_priority,
        &brport_attr_port_id,
@@ -241,7 +241,7 @@ const struct sysfs_ops brport_sysfs_ops = {
 int br_sysfs_addif(struct net_bridge_port *p)
 {
        struct net_bridge *br = p->br;
-       struct brport_attribute **a;
+       const struct brport_attribute **a;
        int err;
 
        err = sysfs_create_link(&p->kobj, &br->dev->dev.kobj,