From: Lizhe <sensor1010@163.com>
To: dmitry.torokhov@gmail.com, geert+renesas@glider.be,
Jonathan.Cameron@huawei.com, soyer@irl.hu
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
Lizhe <sensor1010@163.com>
Subject: [PATCH] input: gpio-keys - use spin_lock()
Date: Sun, 3 Sep 2023 09:03:49 -0700 [thread overview]
Message-ID: <20230903160349.3919-1-sensor1010@163.com> (raw)
Use the spin_lock() and spin_unlock() instead of spin_lock_irqsave()
and spin_unlock_restore()
Signed-off-by: Lizhe <sensor1010@163.com>
---
drivers/input/keyboard/gpio_keys.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index c928829a8b0c..a55d62e1ff6d 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -468,11 +468,10 @@ static irqreturn_t gpio_keys_irq_isr(int irq, void *dev_id)
{
struct gpio_button_data *bdata = dev_id;
struct input_dev *input = bdata->input;
- unsigned long flags;
BUG_ON(irq != bdata->irq);
- spin_lock_irqsave(&bdata->lock, flags);
+ spin_lock(&bdata->lock);
if (!bdata->key_pressed) {
if (bdata->button->wakeup)
@@ -495,7 +494,7 @@ static irqreturn_t gpio_keys_irq_isr(int irq, void *dev_id)
ms_to_ktime(bdata->release_delay),
HRTIMER_MODE_REL_HARD);
out:
- spin_unlock_irqrestore(&bdata->lock, flags);
+ spin_unlock(&bdata->lock);
return IRQ_HANDLED;
}
--
2.25.1
next reply other threads:[~2023-09-03 16:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-03 16:03 Lizhe [this message]
2023-09-04 7:46 ` [PATCH] input: gpio-keys - use spin_lock() Geert Uytterhoeven
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=20230903160349.3919-1-sensor1010@163.com \
--to=sensor1010@163.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=dmitry.torokhov@gmail.com \
--cc=geert+renesas@glider.be \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=soyer@irl.hu \
/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