sysfs: fix sysfs lockdep warning in infiniband code
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 15 Mar 2010 21:01:25 +0000 (14:01 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Mar 2010 14:12:13 +0000 (07:12 -0700)
This fixes a sysfs lockdep warning in the infiniband code.

Cc: Yinghai Lu <yinghai@kernel.org>
Cc: Eric Biederman <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/infiniband/core/sysfs.c

index 1558bb7fc74dd6c2ce19da6d9c277292c0ba0e7b..f901957abc8b54ce68815eb19a26129a0e6b8867 100644 (file)
@@ -461,6 +461,7 @@ alloc_group_attrs(ssize_t (*show)(struct ib_port *,
                element->attr.attr.mode  = S_IRUGO;
                element->attr.show       = show;
                element->index           = i;
+               sysfs_attr_init(&element->attr.attr);
 
                tab_attr[i] = &element->attr.attr;
        }