sysfs: fix sysfs lockdep warning in infiniband code

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>
This commit is contained in:
Greg Kroah-Hartman 2010-03-15 14:01:25 -07:00
parent c7df670bf7
commit 21e3bde964
1 changed files with 1 additions and 0 deletions

View File

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