diff options
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/aoe/aoeblk.c | 23 |
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 | ||
66 | static void | 66 | static 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 | |||
73 | static const struct attribute_group attr_group = { | ||
74 | .attrs = aoe_attrs, | ||
75 | }; | ||
76 | |||
77 | static int | ||
67 | aoedisk_add_sysfs(struct aoedev *d) | 78 | aoedisk_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 | } |
74 | void | 82 | void |
75 | aoedisk_rm_sysfs(struct aoedev *d) | 83 | aoedisk_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 | ||
83 | static int | 88 | static int |