Skip to contentSkip to conversation

ompfb: video: use DEFINE_SPINLOCK() instead of spin_lock_init() in apply.c

PATCH New Yu Jiahua 1 participant 1 message Apr 9, 2021

Subsystems (2)
lore
Share & tools
lore

Yu Jiahua

author
#0 lore raw

PATCH 1/1 ompfb: video: use DEFINE_SPINLOCK() instead of spin_lock_init() in apply.c

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

---
 drivers/video/fbdev/omap2/omapfb/dss/apply.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/video/fbdev/omap2/omapfb/dss/apply.c +1 -3
index c71021091828..acca991c7540 100644
@@ -108,7 +108,7 @@ static struct {
 } dss_data;
 
 /* protects dss_data */
-static spinlock_t data_lock;
+static DEFINE_SPINLOCK(data_lock);
 /* lock for blocking functions */
 static DEFINE_MUTEX(apply_lock);
 static DECLARE_COMPLETION(extra_updated_completion);
@@ -131,8 +131,6 @@ static void apply_init_priv(void)
 	struct mgr_priv_data *mp;
 	int i;
 
-	spin_lock_init(&data_lock);
-
 	for (i = 0; i < num_ovls; ++i) {
 		struct ovl_priv_data *op;
 
Signature · 1 line
2.17.1