[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <f1728883a5bf4481eb1d45e7b7a71005e29e259a.1632467859.git.geert+renesas@glider.be>
Date: Fri, 24 Sep 2021 09:18:02 +0200
From: Geert Uytterhoeven <geert+renesas@...der.be>
To: Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert+renesas@...der.be>
Subject: [PATCH] Input: gpio-keys - print button label in IRQ button error messages
When an error message related to IRQ buttons is printed, no clue is
given about the actual button that caused the failure. Fix this by
including the button label, to make it more obvious which button has an
incomplete or incorrect hardware description.
Signed-off-by: Geert Uytterhoeven <geert+renesas@...der.be>
---
drivers/input/keyboard/gpio_keys.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 0f2250c6aa4978d5..fc706918d7b103cb 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -617,14 +617,16 @@ static int gpio_keys_setup_key(struct platform_device *pdev,
}
} else {
if (!button->irq) {
- dev_err(dev, "Found button without gpio or irq\n");
+ dev_err(dev, "Found button %s without gpio or irq\n",
+ desc);
return -EINVAL;
}
bdata->irq = button->irq;
if (button->type && button->type != EV_KEY) {
- dev_err(dev, "Only EV_KEY allowed for IRQ buttons.\n");
+ dev_err(dev, "Only EV_KEY allowed for IRQ button %s\n",
+ desc);
return -EINVAL;
}
--
2.25.1
Powered by blists - more mailing lists