aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/aoe
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2002-04-09 15:14:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-18 15:53:51 -0400
commit4ca5224f3ea4779054d96e885ca9b3980801ce13 (patch)
tree04b75b597b8c57978b4bbee29448114c89f6dc94 /drivers/block/aoe
parenta12c93f08b8fc83b7fcdabaf92b1adcea7489f5e (diff)
aoe: fix sysfs_create_file warnings
Moved the attributes into a group, making the compiler be quiet about ignoring the return value of the file create calls. This also also fixed a bug when removing the files, which were not symlinks. Cc: "Ed L. Cashin" <ecashin@coraid.com> Cc: Alan Cox <alan@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/block/aoe')
-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