Commit 7ca7ec40 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

drivers/base/node: clean up attribute group conversion

We can use the ATTRIBUTE_GROUPS() macro here, so use it, saving some
lines of code.

Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
parent 3c9b8aaf
...@@ -209,15 +209,7 @@ static struct attribute *node_dev_attrs[] = { ...@@ -209,15 +209,7 @@ static struct attribute *node_dev_attrs[] = {
&dev_attr_vmstat.attr, &dev_attr_vmstat.attr,
NULL NULL
}; };
ATTRIBUTE_GROUPS(node_dev);
static struct attribute_group node_dev_attr_group = {
.attrs = node_dev_attrs,
};
static const struct attribute_group *node_dev_attr_groups[] = {
&node_dev_attr_group,
NULL
};
#ifdef CONFIG_HUGETLBFS #ifdef CONFIG_HUGETLBFS
/* /*
...@@ -292,7 +284,7 @@ static int register_node(struct node *node, int num, struct node *parent) ...@@ -292,7 +284,7 @@ static int register_node(struct node *node, int num, struct node *parent)
node->dev.id = num; node->dev.id = num;
node->dev.bus = &node_subsys; node->dev.bus = &node_subsys;
node->dev.release = node_device_release; node->dev.release = node_device_release;
node->dev.groups = node_dev_attr_groups; node->dev.groups = node_dev_groups;
error = device_register(&node->dev); error = device_register(&node->dev);
if (!error){ if (!error){
......
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