[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20210402031331.232848-1-yujiahua1@huawei.com>
Date:   Thu, 1 Apr 2021 19:13:31 -0800
From:   Yu Jiahua <yujiahua1@...wei.com>
To:     <linux-omap@...r.kernel.org>, <linux-fbdev@...r.kernel.org>,
        <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>,
        <zhengzucheng@...wei.com>, <hucool.lihua@...wei.com>
CC:     Jiahua Yu <yujiahua1@...wei.com>
Subject: [PATCH] apply: use DEFINE_SPINLOCK() instead of spin_lock_init().
From: Jiahua Yu <yujiahua1@...wei.com>
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Signed-off-by: Jiahua Yu <yujiahua1@...wei.com>
---
 drivers/video/fbdev/omap2/omapfb/dss/apply.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/omap2/omapfb/dss/apply.c b/drivers/video/fbdev/omap2/omapfb/dss/apply.c
index c71021091828..acca991c7540 100644
--- a/drivers/video/fbdev/omap2/omapfb/dss/apply.c
+++ b/drivers/video/fbdev/omap2/omapfb/dss/apply.c
@@ -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;
 
-- 
2.17.1
Powered by blists - more mailing lists