From: Chen Lifu <chenlifu@huawei.com>
To: <chenlifu@huawei.com>, Russell King <linux@armlinux.org.uk>
Cc: <heying24@huawei.com>, <yuehaibing@huawei.com>,
<weiyongjun1@huawei.com>, <johnny.chenyi@huawei.com>,
<linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <kernel-janitors@vger.kernel.org>
Subject: [PATCH -next] i2c: gpio: use DEFINE_SPINLOCK() for spinlock
Date: Sat, 27 Mar 2021 17:52:28 +0800 [thread overview]
Message-ID: <20210327095228.105123-1-chenlifu@huawei.com> (raw)
From: Lifu Chen <chenlifu@huawei.com>
spinlock can be initialized automatically with DEFINE_SPINLOCK()
rather than explicitly calling spin_lock_init().
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lifu Chen <chenlifu@huawei.com>
---
arch/arm/mach-sa1100/simpad.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/mach-sa1100/simpad.c b/arch/arm/mach-sa1100/simpad.c
index c7fb9a73e4c5..c183432880d3 100644
--- a/arch/arm/mach-sa1100/simpad.c
+++ b/arch/arm/mach-sa1100/simpad.c
@@ -45,7 +45,7 @@
*/
static long cs3_shadow;
-static spinlock_t cs3_lock;
+static DEFINE_SPINLOCK(cs3_lock);
static struct gpio_chip cs3_gpio;
long simpad_get_cs3_ro(void)
@@ -379,8 +379,6 @@ static int __init simpad_init(void)
{
int ret;
- spin_lock_init(&cs3_lock);
-
cs3_gpio.label = "simpad_cs3";
cs3_gpio.base = SIMPAD_CS3_GPIO_BASE;
cs3_gpio.ngpio = 24;
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2021-03-27 9:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-27 9:52 Chen Lifu [this message]
2021-04-01 3:38 ` [PATCH -next] i2c: gpio: use DEFINE_SPINLOCK() for spinlock chenlifu
2021-04-01 7:49 ` Dan Carpenter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210327095228.105123-1-chenlifu@huawei.com \
--to=chenlifu@huawei.com \
--cc=heying24@huawei.com \
--cc=johnny.chenyi@huawei.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=weiyongjun1@huawei.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).