aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/aoe/aoeblk.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 4259b52b01e2..d433f27e0ce2 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -63,21 +63,26 @@ static struct disk_attribute disk_attr_fwver = {
63 .show = aoedisk_show_fwver 63 .show = aoedisk_show_fwver
64}; 64};
65 65
66static void 66static struct attribute *aoe_attrs[] = {
67 &disk_attr_state.attr,
68 &disk_attr_mac.attr,
69 &disk_attr_netif.attr,
70 &disk_attr_fwver.attr,
71};
72
73static const struct attribute_group attr_group = {
74 .attrs = aoe_attrs,
75};
76
77static int
67aoedisk_add_sysfs(struct aoedev *d) 78aoedisk_add_sysfs(struct aoedev *d)
68{ 79{
69 sysfs_create_file(&d->gd->kobj, &disk_attr_state.attr); 80 return sysfs_create_group(&d->gd->kobj, &attr_group);
70 sysfs_create_file(&d->gd->kobj, &disk_attr_mac.attr);
71 sysfs_create_file(&d->gd->kobj, &disk_attr_netif.attr);
72 sysfs_create_file(&d->gd->kobj, &disk_attr_fwver.attr);
73} 81}
74void 82void
75aoedisk_rm_sysfs(struct aoedev *d) 83aoedisk_rm_sysfs(struct aoedev *d)
76{ 84{
77 sysfs_remove_link(&d->gd->kobj, "state"); 85 sysfs_remove_group(&d->gd->kobj, &attr_group);
78 sysfs_remove_link(&d->gd->kobj, "mac");
79 sysfs_remove_link(&d->gd->kobj, "netif");
80 sysfs_remove_link(&d->gd->kobj, "firmware-version");
81} 86}
82 87
83static int 88static int