Skip to contentSkip to conversation

Input: gpio-keys - do not BUG() on requested wakeirqs

PATCH Applied Andreas Kemnade 2 participants 2 messages Nov 7 – Nov 9

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Input: gpio-keys - do not BUG() on requested wakeirqs

Having the IRQ handler called when enabled IRQs arrive should be considered as a feature not as a bug. So do not BUG() there when this happens. Also BUG() is too harsh here.

Fixes 3717194f24922 ("Input: gpio-keys - add system suspend support for dedicated wakeirqs")

---
Changes in v2:
do not BUG() at all here and remove the other similar instance of this BUG().

 drivers/input/keyboard/gpio_keys.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/input/keyboard/gpio_keys.c +0 -4
index fbc31c5db3db4..41a9210b40176 100644
@@ -412,8 +412,6 @@ static irqreturn_t gpio_keys_gpio_isr(int irq, void *dev_id)
 {
 	struct gpio_button_data *bdata = dev_id;
 
-	BUG_ON(irq != bdata->irq);
-
 	if (bdata->button->wakeup) {
 		const struct gpio_keys_button *button = bdata->button;
 
@@ -465,8 +463,6 @@ 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;
 
-	BUG_ON(irq != bdata->irq);
-
 	guard(spinlock_irqsave)(&bdata->lock);
 
 	if (!bdata->key_pressed) {
Signature · 1 line
2.47.3
maintainer Applied
#1 lore raw
Quoted 6 lines · Andreas Kemnade

Having the IRQ handler called when enabled IRQs arrive should be considered as a feature not as a bug. So do not BUG() there when this happens. Also BUG() is too harsh here.

Fixes 3717194f24922 ("Input: gpio-keys - add system suspend support for dedicated wakeirqs")

Applied, thank you.

Signature · 1 line
Dmitry