From: David Herrmann <dh.herrmann at gmail.com> Use static initializers instead of setting up global variables during runtime. This reduces code size and execution time. Signed-off-by: David Herrmann <dh.herrmann at gmail.com> --- drivers/video/backlight/backlight.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 288318a..37f6173 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -21,9 +21,9 @@ #include <asm/backlight.h> #endif -static struct list_head backlight_dev_list; -static struct mutex backlight_dev_list_mutex; -static struct blocking_notifier_head backlight_notifier; +static LIST_HEAD(backlight_dev_list); +static DEFINE_MUTEX(backlight_dev_list_mutex); +static BLOCKING_NOTIFIER_HEAD(backlight_notifier); static const char *const backlight_types[] = { [BACKLIGHT_RAW] = "raw", @@ -591,9 +591,6 @@ static int __init backlight_class_init(void) backlight_class->dev_groups = bl_device_groups; backlight_class->pm = &backlight_class_dev_pm_ops; - INIT_LIST_HEAD(&backlight_dev_list); - mutex_init(&backlight_dev_list_mutex); - BLOCKING_INIT_NOTIFIER_HEAD(&backlight_notifier); return 0; } -- 2.9.3 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel