memstick: init sysfs attributes
authorMaxim Levitsky <maximlevitsky@gmail.com>
Wed, 11 Aug 2010 21:17:52 +0000 (14:17 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 12 Aug 2010 15:43:31 +0000 (08:43 -0700)
Otherwise lockdep complains.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Alex Dubov <oakad@yahoo.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/memstick/core/mspro_block.c

index eef78a0..aa5ac6e 100644 (file)
@@ -1048,6 +1048,7 @@ static int mspro_block_read_attributes(struct memstick_dev *card)
                        snprintf(s_attr->name, sizeof(s_attr->name),
                                 "attr_x%02x", attr->entries[cnt].id);
 
+               sysfs_attr_init(&s_attr->dev_attr.attr);
                s_attr->dev_attr.attr.name = s_attr->name;
                s_attr->dev_attr.attr.mode = S_IRUGO;
                s_attr->dev_attr.show = mspro_block_attr_show(s_attr->id);