Commit 8c5e9fb8 authored by David S. Miller's avatar David S. Miller

Merge branch 'net-attribute_group-const'

Arvind Yadav says:

====================
constify net attribute_group structures.

attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 7d2a055b 98dc8373
...@@ -109,7 +109,7 @@ static struct attribute *com20020_state_attrs[] = { ...@@ -109,7 +109,7 @@ static struct attribute *com20020_state_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group com20020_state_group = { static const struct attribute_group com20020_state_group = {
.name = NULL, .name = NULL,
.attrs = com20020_state_attrs, .attrs = com20020_state_attrs,
}; };
......
...@@ -759,7 +759,7 @@ static struct attribute *per_bond_attrs[] = { ...@@ -759,7 +759,7 @@ static struct attribute *per_bond_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group bonding_group = { static const struct attribute_group bonding_group = {
.name = "bonding", .name = "bonding",
.attrs = per_bond_attrs, .attrs = per_bond_attrs,
}; };
......
...@@ -1232,7 +1232,7 @@ static struct attribute *at91_sysfs_attrs[] = { ...@@ -1232,7 +1232,7 @@ static struct attribute *at91_sysfs_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group at91_sysfs_attr_group = { static const struct attribute_group at91_sysfs_attr_group = {
.attrs = at91_sysfs_attrs, .attrs = at91_sysfs_attrs,
}; };
......
...@@ -1875,7 +1875,7 @@ static struct attribute *ican3_sysfs_attrs[] = { ...@@ -1875,7 +1875,7 @@ static struct attribute *ican3_sysfs_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group ican3_sysfs_attr_group = { static const struct attribute_group ican3_sysfs_attr_group = {
.attrs = ican3_sysfs_attrs, .attrs = ican3_sysfs_attrs,
}; };
......
...@@ -793,7 +793,9 @@ static struct attribute *cxgb3_attrs[] = { ...@@ -793,7 +793,9 @@ static struct attribute *cxgb3_attrs[] = {
NULL NULL
}; };
static struct attribute_group cxgb3_attr_group = {.attrs = cxgb3_attrs }; static const struct attribute_group cxgb3_attr_group = {
.attrs = cxgb3_attrs,
};
static ssize_t tm_attr_show(struct device *d, static ssize_t tm_attr_show(struct device *d,
char *buf, int sched) char *buf, int sched)
...@@ -880,7 +882,9 @@ static struct attribute *offload_attrs[] = { ...@@ -880,7 +882,9 @@ static struct attribute *offload_attrs[] = {
NULL NULL
}; };
static struct attribute_group offload_attr_group = {.attrs = offload_attrs }; static const struct attribute_group offload_attr_group = {
.attrs = offload_attrs,
};
/* /*
* Sends an sk_buff to an offload queue driver * Sends an sk_buff to an offload queue driver
......
...@@ -367,7 +367,7 @@ static struct attribute *cdc_ncm_sysfs_attrs[] = { ...@@ -367,7 +367,7 @@ static struct attribute *cdc_ncm_sysfs_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group cdc_ncm_sysfs_attr_group = { static const struct attribute_group cdc_ncm_sysfs_attr_group = {
.name = "cdc_ncm", .name = "cdc_ncm",
.attrs = cdc_ncm_sysfs_attrs, .attrs = cdc_ncm_sysfs_attrs,
}; };
......
...@@ -4324,7 +4324,7 @@ static struct attribute *ipw2100_sysfs_entries[] = { ...@@ -4324,7 +4324,7 @@ static struct attribute *ipw2100_sysfs_entries[] = {
NULL, NULL,
}; };
static struct attribute_group ipw2100_attribute_group = { static const struct attribute_group ipw2100_attribute_group = {
.attrs = ipw2100_sysfs_entries, .attrs = ipw2100_sysfs_entries,
}; };
......
...@@ -11500,7 +11500,7 @@ static struct attribute *ipw_sysfs_entries[] = { ...@@ -11500,7 +11500,7 @@ static struct attribute *ipw_sysfs_entries[] = {
NULL NULL
}; };
static struct attribute_group ipw_attribute_group = { static const struct attribute_group ipw_attribute_group = {
.name = NULL, /* put in device directory */ .name = NULL, /* put in device directory */
.attrs = ipw_sysfs_entries, .attrs = ipw_sysfs_entries,
}; };
......
...@@ -3464,7 +3464,7 @@ static struct attribute *il3945_sysfs_entries[] = { ...@@ -3464,7 +3464,7 @@ static struct attribute *il3945_sysfs_entries[] = {
NULL NULL
}; };
static struct attribute_group il3945_attribute_group = { static const struct attribute_group il3945_attribute_group = {
.name = NULL, /* put in device directory */ .name = NULL, /* put in device directory */
.attrs = il3945_sysfs_entries, .attrs = il3945_sysfs_entries,
}; };
......
...@@ -4654,7 +4654,7 @@ static struct attribute *il_sysfs_entries[] = { ...@@ -4654,7 +4654,7 @@ static struct attribute *il_sysfs_entries[] = {
NULL NULL
}; };
static struct attribute_group il_attribute_group = { static const struct attribute_group il_attribute_group = {
.name = NULL, /* put in device directory */ .name = NULL, /* put in device directory */
.attrs = il_sysfs_entries, .attrs = il_sysfs_entries,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment