Skip to contentSkip to conversation

mmc: Convert to use ATTRIBUTE_GROUPS

PATCH RESEND In review Axel Lin 2 participants 3 messages Mar 8, 2014 – Apr 9, 2014 MMC, SD and SDIO

lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH RESEND 1/1 mmc: Convert to use ATTRIBUTE_GROUPS

Use new ATTRIBUTE_GROUPS macro to declare attribute groups.

---
 drivers/mmc/core/mmc.c | 12 ++----------
 drivers/mmc/core/sd.c  | 12 ++----------
 2 files changed, 4 insertions(+), 20 deletions(-)
drivers/mmc/core/mmc.c +2 -10
index f631f5a..db0f250 100644
@@ -694,18 +694,10 @@ static struct attribute *mmc_std_attrs[] = {
 	&dev_attr_rel_sectors.attr,
 	NULL,
 };
-
-static struct attribute_group mmc_std_attr_group = {
-	.attrs = mmc_std_attrs,
-};
-
-static const struct attribute_group *mmc_attr_groups[] = {
-	&mmc_std_attr_group,
-	NULL,
-};
+ATTRIBUTE_GROUPS(mmc_std);
 
 static struct device_type mmc_type = {
-	.groups = mmc_attr_groups,
+	.groups = mmc_std_groups,
 };
 
 /*
drivers/mmc/core/sd.c +2 -10
index 6f42050..c52cb77 100644
@@ -700,18 +700,10 @@ static struct attribute *sd_std_attrs[] = {
 	&dev_attr_serial.attr,
 	NULL,
 };
-
-static struct attribute_group sd_std_attr_group = {
-	.attrs = sd_std_attrs,
-};
-
-static const struct attribute_group *sd_attr_groups[] = {
-	&sd_std_attr_group,
-	NULL,
-};
+ATTRIBUTE_GROUPS(sd_std);
 
 struct device_type sd_type = {
-	.groups = sd_attr_groups,
+	.groups = sd_std_groups,
 };
 
 /*
Signature · 1 line
1.8.1.2
author
#1 lore raw

2014-03-08 15:05 GMT+08:00 Axel Lin <[email protected]>:

Quoted 1 line

Use new ATTRIBUTE_GROUPS macro to declare attribute groups.

Hi Chris,
Any comment on this patch?

Regards,
Axel

Acked-by on v1 1/1
#2 lore raw
In reply to Axel Lin
Quoted 3 lines · Axel Lin

Use new ATTRIBUTE_GROUPS macro to declare attribute groups.

Quoted 64 lines
---
 drivers/mmc/core/mmc.c | 12 ++----------
 drivers/mmc/core/sd.c  | 12 ++----------
 2 files changed, 4 insertions(+), 20 deletions(-)
drivers/mmc/core/mmc.c +2 -10
index f631f5a..db0f250 100644
@@ -694,18 +694,10 @@ static struct attribute *mmc_std_attrs[] = {
        &dev_attr_rel_sectors.attr,
        NULL,
 };
-
-static struct attribute_group mmc_std_attr_group = {
-       .attrs = mmc_std_attrs,
-};
-
-static const struct attribute_group *mmc_attr_groups[] = {
-       &mmc_std_attr_group,
-       NULL,
-};
+ATTRIBUTE_GROUPS(mmc_std);
 
 static struct device_type mmc_type = {
-       .groups = mmc_attr_groups,
+       .groups = mmc_std_groups,
 };
 
 /*
drivers/mmc/core/sd.c +2 -11
index 6f42050..c52cb77 100644
@@ -700,18 +700,10 @@ static struct attribute *sd_std_attrs[] = {
        &dev_attr_serial.attr,
        NULL,
 };
-
-static struct attribute_group sd_std_attr_group = {
-       .attrs = sd_std_attrs,
-};
-
-static const struct attribute_group *sd_attr_groups[] = {
-       &sd_std_attr_group,
-       NULL,
-};
+ATTRIBUTE_GROUPS(sd_std);
 
 struct device_type sd_type = {
-       .groups = sd_attr_groups,
+       .groups = sd_std_groups,
 };
 
 /*
--

1.8.1.2

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html