From: Zheng Yongjun <zhengyongjun3@huawei.com> To: <zhengyongjun3@huawei.com>, Lee Jones <lee.jones@linaro.org>, "Daniel Thompson" <daniel.thompson@linaro.org>, Jingoo Han <jingoohan1@gmail.com> Cc: <dri-devel@lists.freedesktop.org>, <linux-fbdev@vger.kernel.org>, <kernel-janitors@vger.kernel.org>, Hulk Robot <hulkci@huawei.com> Subject: [PATCH -next] backlight: backlight: Use DEFINE_MUTEX() for mutex lock Date: Mon, 5 Apr 2021 18:14:40 +0800 [thread overview] Message-ID: <20210405101440.14937-1-zhengyongjun3@huawei.com> (raw) mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> --- drivers/video/backlight/backlight.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 537fe1b376ad..d7a09c422547 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -64,7 +64,7 @@ */ static struct list_head backlight_dev_list; -static struct mutex backlight_dev_list_mutex; +static DEFINE_MUTEX(backlight_dev_list_mutex); static struct blocking_notifier_head backlight_notifier; static const char *const backlight_types[] = { @@ -757,7 +757,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;
WARNING: multiple messages have this Message-ID (diff)
From: Zheng Yongjun <zhengyongjun3@huawei.com> To: <zhengyongjun3@huawei.com>, Lee Jones <lee.jones@linaro.org>, "Daniel Thompson" <daniel.thompson@linaro.org>, Jingoo Han <jingoohan1@gmail.com> Cc: Hulk Robot <hulkci@huawei.com>, linux-fbdev@vger.kernel.org, kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [PATCH -next] backlight: backlight: Use DEFINE_MUTEX() for mutex lock Date: Mon, 5 Apr 2021 18:14:40 +0800 [thread overview] Message-ID: <20210405101440.14937-1-zhengyongjun3@huawei.com> (raw) mutex lock can be initialized automatically with DEFINE_MUTEX() rather than explicitly calling mutex_init(). Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com> --- drivers/video/backlight/backlight.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 537fe1b376ad..d7a09c422547 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -64,7 +64,7 @@ */ static struct list_head backlight_dev_list; -static struct mutex backlight_dev_list_mutex; +static DEFINE_MUTEX(backlight_dev_list_mutex); static struct blocking_notifier_head backlight_notifier; static const char *const backlight_types[] = { @@ -757,7 +757,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; _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2021-04-05 10:00 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-04-05 10:14 Zheng Yongjun [this message] 2021-04-05 10:14 ` [PATCH -next] backlight: backlight: Use DEFINE_MUTEX() for mutex lock Zheng Yongjun 2021-04-06 8:51 ` Daniel Thompson 2021-04-06 8:51 ` Daniel Thompson
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210405101440.14937-1-zhengyongjun3@huawei.com \ --to=zhengyongjun3@huawei.com \ --cc=daniel.thompson@linaro.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=hulkci@huawei.com \ --cc=jingoohan1@gmail.com \ --cc=kernel-janitors@vger.kernel.org \ --cc=lee.jones@linaro.org \ --cc=linux-fbdev@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.