From 53cd255ce7539eff28d86eafb3416a6d964be4df Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 15 May 2015 16:20:05 +0800 Subject: 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 Tested-by: Sheng Yong Signed-off-by: hujianyang Signed-off-by: Richard Weinberger --- drivers/mtd/ubi/ubi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/mtd/ubi/ubi.h') diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index c998212fc680..2974b67f6c6c 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h @@ -775,7 +775,7 @@ extern struct kmem_cache *ubi_wl_entry_slab; extern const struct file_operations ubi_ctrl_cdev_operations; extern const struct file_operations ubi_cdev_operations; extern const struct file_operations ubi_vol_cdev_operations; -extern struct class *ubi_class; +extern struct class ubi_class; extern struct mutex ubi_devices_mutex; extern struct blocking_notifier_head ubi_notifiers; -- cgit v1.2.3