From: Maxim Levitsky Date: Wed, 11 Aug 2010 21:17:52 +0000 (-0700) Subject: memstick: init sysfs attributes X-Git-Tag: v2.6.34.6~90 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7db3ade7abd16f53abe927c2a467c2f38d731c33;p=thirdparty%2Fkernel%2Fstable.git memstick: init sysfs attributes commit 21fd0495ea61d53e0ebe575330e343ce4e6d2a61 upstream. Otherwise lockdep complains. Signed-off-by: Maxim Levitsky Cc: Alex Dubov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c index 8327e248520ac..369313fa359a0 100644 --- a/drivers/memstick/core/mspro_block.c +++ b/drivers/memstick/core/mspro_block.c @@ -1040,6 +1040,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);