lkml.org 
[lkml]   [2023]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] input: gpio-keys - use spin_lock()
Date
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
\
 
 \ /
  Last update: 2023-09-03 18:20    [W:0.024 / U:1.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site