aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/attribute_container.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@suse.de>2010-03-20 12:44:12 -0500
committerJames Bottomley <James.Bottomley@suse.de>2010-03-27 15:15:24 -0400
commitebd09ec93c90c8ec571d7e166832fb1fc705bf5e (patch)
treef5ec7e8471e4828187ed32d8148f7e6be28d8306 /drivers/base/attribute_container.c
parent[SCSI] advansys: fix regression with request_firmware change (diff)
downloadlinux-dev-ebd09ec93c90c8ec571d7e166832fb1fc705bf5e.tar.xz
linux-dev-ebd09ec93c90c8ec571d7e166832fb1fc705bf5e.zip
[SCSI] attirbute_container: Initialize sysfs attributes with sysfs_attr_init
All of the SCSI transport classes are suddenly spitting lockdep warnings. According to Eric Biderman this is because lockdep needs static initialisers and the attribute container way of doing things end up with dynamic sysfs attributes. Fix this by calling sysfs_attr_init which sets the lockdep key correctly. Tested-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/base/attribute_container.c')
-rw-r--r--drivers/base/attribute_container.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/attribute_container.c b/drivers/base/attribute_container.c
index b9cda053d3c0..8fc200b2e2c0 100644
--- a/drivers/base/attribute_container.c
+++ b/drivers/base/attribute_container.c
@@ -328,6 +328,7 @@ attribute_container_add_attrs(struct device *classdev)
return sysfs_create_group(&classdev->kobj, cont->grp);
for (i = 0; attrs[i]; i++) {
+ sysfs_attr_init(&attrs[i]->attr);
error = device_create_file(classdev, attrs[i]);
if (error)
return error;