]> git.baikalelectronics.ru Git - kernel.git/commit
UBI: Use static class and attribute groups
authorTakashi Iwai <tiwai@suse.de>
Fri, 15 May 2015 08:20:05 +0000 (16:20 +0800)
committerRichard Weinberger <richard@nod.at>
Tue, 2 Jun 2015 11:16:25 +0000 (13:16 +0200)
commit8c20416e7e391423312178f65694eaba630e4a67
tree779184c20c79089bab443762e2c618a9dd3eacde
parent63733c73637ac5cfa3fa418c0d98c49607a9f4fb
UBI: Use static class and attribute groups

This patch cleans up the manual device_create_file() or
class_create_file() calls by replacing with static attribute groups.
It simplifies the code and also avoids the possible races between the
device/class registration and sysfs creations.

For the simplification, also make ubi_class a static instance with
initializers, too.

Amend a bit by Hujianyang.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Tested-by: Sheng Yong <shengyong1@huawei.com>
Signed-off-by: hujianyang <hujianyang@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/build.c
drivers/mtd/ubi/ubi.h
drivers/mtd/ubi/vmt.c