Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev/omap2: use DEFINE_SPINLOCK() instead of spin_lock_init().

spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().

Signed-off-by: Jiahua Yu <yujiahua1@huawei.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20210616031713.24959-1-yujiahua1@huawei.com

authored by

Jiahua Yu and committed by
Daniel Vetter
d35c97f6 9f808288

+1 -3
+1 -3
drivers/video/fbdev/omap2/omapfb/dss/apply.c
··· 108 108 } dss_data; 109 109 110 110 /* protects dss_data */ 111 - static spinlock_t data_lock; 111 + static DEFINE_SPINLOCK(data_lock); 112 112 /* lock for blocking functions */ 113 113 static DEFINE_MUTEX(apply_lock); 114 114 static DECLARE_COMPLETION(extra_updated_completion); ··· 130 130 const int num_ovls = dss_feat_get_num_ovls(); 131 131 struct mgr_priv_data *mp; 132 132 int i; 133 - 134 - spin_lock_init(&data_lock); 135 133 136 134 for (i = 0; i < num_ovls; ++i) { 137 135 struct ovl_priv_data *op;