diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-25 13:47:17 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-25 13:47:17 +0100 |
commit | 7ca7ec40f42a13c6966fb3a5d8713e895d58c728 (patch) | |
tree | 853b42928731db688791bb836715e409618ef9ff /drivers | |
parent | 3c9b8aaf95bb4de3d8ac9fd83d4aca2c97bd9f2a (diff) | |
download | linux-7ca7ec40f42a13c6966fb3a5d8713e895d58c728.tar.bz2 |
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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/base/node.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c index 06dce51e42e7..6356866167af 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -209,15 +209,7 @@ static struct attribute *node_dev_attrs[] = { &dev_attr_vmstat.attr, NULL }; - -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 -}; +ATTRIBUTE_GROUPS(node_dev); #ifdef CONFIG_HUGETLBFS /* @@ -292,7 +284,7 @@ static int register_node(struct node *node, int num, struct node *parent) node->dev.id = num; node->dev.bus = &node_subsys; node->dev.release = node_device_release; - node->dev.groups = node_dev_attr_groups; + node->dev.groups = node_dev_groups; error = device_register(&node->dev); if (!error){ |