Skip to content
Commit 53cd255c authored by Takashi Iwai's avatar Takashi Iwai Committed by Richard Weinberger
Browse files

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: default avatarTakashi Iwai <tiwai@suse.de>
Tested-by: default avatarSheng Yong <shengyong1@huawei.com>
Signed-off-by: default avatarhujianyang <hujianyang@huawei.com>
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 2848594a
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment