summaryrefslogtreecommitdiff
path: root/drivers/input
diff options
context:
space:
mode:
authorJiri Valek - 2N <jiriv@axis.com>2023-11-17 02:41:52 +0000
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2023-11-17 02:54:14 +0000
commitfedfa36d045ab78ea9a0aa2c5a3d5d74c27207d3 (patch)
tree605a69477211b9525aa5f50bbe81b93334c07eda /drivers/input
parentccb9e9dd2a996f5814d7072b968b3d2f4b094188 (diff)
Input: cap11xx - remove unnecessary IRQ parsing
Separate IRQ parsing is not necessary, I2C core do the job. Signed-off-by: Jiri Valek - 2N <jiriv@axis.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input')
-rw-r--r--drivers/input/keyboard/cap11xx.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/input/keyboard/cap11xx.c b/drivers/input/keyboard/cap11xx.c
index 1b4937dce672..01e7ead68fea 100644
--- a/drivers/input/keyboard/cap11xx.c
+++ b/drivers/input/keyboard/cap11xx.c
@@ -10,7 +10,7 @@
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/leds.h>
-#include <linux/of_irq.h>
+#include <linux/of.h>
#include <linux/regmap.h>
#include <linux/i2c.h>
#include <linux/gpio/consumer.h>
@@ -334,7 +334,7 @@ static int cap11xx_i2c_probe(struct i2c_client *i2c_client)
struct cap11xx_priv *priv;
struct device_node *node;
const struct cap11xx_hw_model *cap;
- int i, error, irq, gain = 0;
+ int i, error, gain = 0;
unsigned int val, rev;
u32 gain32;
@@ -474,13 +474,8 @@ static int cap11xx_i2c_probe(struct i2c_client *i2c_client)
if (error)
return error;
- irq = irq_of_parse_and_map(node, 0);
- if (!irq) {
- dev_err(dev, "Unable to parse or map IRQ\n");
- return -ENXIO;
- }
-
- error = devm_request_threaded_irq(dev, irq, NULL, cap11xx_thread_func,
+ error = devm_request_threaded_irq(dev, i2c_client->irq,
+ NULL, cap11xx_thread_func,
IRQF_ONESHOT, dev_name(dev), priv);
if (error)
return error;