staging: fsl-mc: convert to use ATTRIBUTE_GROUPS macro
authorWei Yongjun <weiyongjun1@huawei.com>
Sun, 28 Aug 2016 16:19:29 +0000 (16:19 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Sep 2016 15:59:20 +0000 (17:59 +0200)
Use ATTRIBUTE_GROUPS macro to reduce the number of lines of code.

Generated by Coccinelle semantic patch.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/fsl-mc/bus/fsl-mc-bus.c

index 03ebab8..3d687b5 100644 (file)
@@ -137,14 +137,8 @@ static struct attribute *fsl_mc_dev_attrs[] = {
        NULL,
 };
 
-static const struct attribute_group fsl_mc_dev_group = {
-       .attrs = fsl_mc_dev_attrs,
-};
+ATTRIBUTE_GROUPS(fsl_mc_dev);
 
-static const struct attribute_group *fsl_mc_dev_groups[] = {
-       &fsl_mc_dev_group,
-       NULL,
-};
 
 struct bus_type fsl_mc_bus_type = {
        .name = "fsl-mc",