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:
parent
c7df670bf7
commit
21e3bde964
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue