Patchwork mtd: Convert to use ATTRIBUTE_GROUPS

login
register
mail settings
Submitter Axel Lin
Date Dec. 2, 2013, 2:12 a.m.
Message ID <1385950345.30717.1.camel@phoenix>
Download mbox | patch
Permalink /patch/295755/
State Accepted
Commit 54c738f694ab67a007a43482d1dd7cf956fbb6c3
Headers show

Comments

Axel Lin - Dec. 2, 2013, 2:12 a.m.
Use new ATTRIBUTE_GROUPS macro to declare attribute groups.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 drivers/mtd/mtdcore.c | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
Brian Norris - Dec. 5, 2013, 2:10 a.m.
On Mon, Dec 02, 2013 at 10:12:25AM +0800, Axel Lin wrote:
> Use new ATTRIBUTE_GROUPS macro to declare attribute groups.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Pushed to l2-mtd.git. Thanks!

Brian

Patch

diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 92311a5..34c0b16 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -313,15 +313,7 @@  static struct attribute *mtd_attrs[] = {
 	&dev_attr_bitflip_threshold.attr,
 	NULL,
 };
-
-static struct attribute_group mtd_group = {
-	.attrs		= mtd_attrs,
-};
-
-static const struct attribute_group *mtd_groups[] = {
-	&mtd_group,
-	NULL,
-};
+ATTRIBUTE_GROUPS(mtd);
 
 static struct device_type mtd_devtype = {
 	.name		= "mtd",