[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210327095225.104997-1-chenlifu@huawei.com>
Date: Sat, 27 Mar 2021 17:52:25 +0800
From: Chen Lifu <chenlifu@...wei.com>
To: <chenlifu@...wei.com>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Zhang Qilong <zhangqilong3@...wei.com>
CC: <heying24@...wei.com>, <yuehaibing@...wei.com>,
<weiyongjun1@...wei.com>, <johnny.chenyi@...wei.com>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <linux-mips@...r.kernel.org>,
<kernel-janitors@...r.kernel.org>
Subject: [PATCH -next] MIPS: Alchemy: Use DEFINE_SPINLOCK() for spinlock
From: Lifu Chen <chenlifu@...wei.com>
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Reported-by: Hulk Robot <hulkci@...wei.com>
Signed-off-by: Lifu Chen <chenlifu@...wei.com>
---
arch/mips/alchemy/common/clock.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/mips/alchemy/common/clock.c b/arch/mips/alchemy/common/clock.c
index f0c830337104..c01be8c45271 100644
--- a/arch/mips/alchemy/common/clock.c
+++ b/arch/mips/alchemy/common/clock.c
@@ -111,7 +111,7 @@ static struct clk_aliastable {
/* access locks to SYS_FREQCTRL0/1 and SYS_CLKSRC registers */
static spinlock_t alchemy_clk_fg0_lock;
static spinlock_t alchemy_clk_fg1_lock;
-static spinlock_t alchemy_clk_csrc_lock;
+static DEFINE_SPINLOCK(alchemy_clk_csrc_lock);
/* CPU Core clock *****************************************************/
@@ -996,7 +996,6 @@ static int __init alchemy_clk_setup_imux(int ctype)
if (!a)
return -ENOMEM;
- spin_lock_init(&alchemy_clk_csrc_lock);
ret = 0;
for (i = 0; i < 6; i++) {
Powered by blists - more mailing lists