* [PATCH v2 -next] vermilion.c: use DEFINE_MUTEX() for mutex lock
@ 2020-12-24 13:26 ` Zheng Yongjun
0 siblings, 0 replies; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-24 13:26 UTC (permalink / raw)
To: b.zolnierkie, dri-devel, linux-fbdev, linux-kernel; +Cc: Zheng Yongjun
mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/video/fbdev/vermilion/vermilion.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/vermilion/vermilion.c b/drivers/video/fbdev/vermilion/vermilion.c
index ff61605b8764..cf41f3c50af8 100644
--- a/drivers/video/fbdev/vermilion/vermilion.c
+++ b/drivers/video/fbdev/vermilion/vermilion.c
@@ -35,7 +35,7 @@
#define VML_TOHW(_val, _width) ((((_val) << (_width)) + 0x7FFF - (_val)) >> 16)
-static struct mutex vml_mutex;
+static DEFINE_MUTEX(vml_mutex);
static struct list_head global_no_mode;
static struct list_head global_has_mode;
static struct fb_ops vmlfb_ops;
@@ -1058,7 +1058,6 @@ static int __init vmlfb_init(void)
#endif
printk(KERN_DEBUG MODULE_NAME ": initializing\n");
- mutex_init(&vml_mutex);
INIT_LIST_HEAD(&global_no_mode);
INIT_LIST_HEAD(&global_has_mode);
--
2.22.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v2 -next] vermilion.c: use DEFINE_MUTEX() for mutex lock
@ 2020-12-24 13:26 ` Zheng Yongjun
0 siblings, 0 replies; 2+ messages in thread
From: Zheng Yongjun @ 2020-12-24 13:26 UTC (permalink / raw)
To: b.zolnierkie, dri-devel, linux-fbdev, linux-kernel; +Cc: Zheng Yongjun
mutex lock can be initialized automatically with DEFINE_MUTEX()
rather than explicitly calling mutex_init().
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
drivers/video/fbdev/vermilion/vermilion.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/fbdev/vermilion/vermilion.c b/drivers/video/fbdev/vermilion/vermilion.c
index ff61605b8764..cf41f3c50af8 100644
--- a/drivers/video/fbdev/vermilion/vermilion.c
+++ b/drivers/video/fbdev/vermilion/vermilion.c
@@ -35,7 +35,7 @@
#define VML_TOHW(_val, _width) ((((_val) << (_width)) + 0x7FFF - (_val)) >> 16)
-static struct mutex vml_mutex;
+static DEFINE_MUTEX(vml_mutex);
static struct list_head global_no_mode;
static struct list_head global_has_mode;
static struct fb_ops vmlfb_ops;
@@ -1058,7 +1058,6 @@ static int __init vmlfb_init(void)
#endif
printk(KERN_DEBUG MODULE_NAME ": initializing\n");
- mutex_init(&vml_mutex);
INIT_LIST_HEAD(&global_no_mode);
INIT_LIST_HEAD(&global_has_mode);
--
2.22.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-12-25 9:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-24 13:26 [PATCH v2 -next] vermilion.c: use DEFINE_MUTEX() for mutex lock Zheng Yongjun
2020-12-24 13:26 ` Zheng Yongjun
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.