diff options
| -rw-r--r-- | drivers/input/keyboard/tca8418_keypad.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/input/keyboard/tca8418_keypad.c b/drivers/input/keyboard/tca8418_keypad.c index 1a2894dd03ca..ac4ff13f51cc 100644 --- a/drivers/input/keyboard/tca8418_keypad.c +++ b/drivers/input/keyboard/tca8418_keypad.c | |||
| @@ -224,16 +224,18 @@ static irqreturn_t tca8418_irq_handler(int irq, void *dev_id) | |||
| 224 | if (error) { | 224 | if (error) { |
| 225 | dev_err(&keypad_data->client->dev, | 225 | dev_err(&keypad_data->client->dev, |
| 226 | "unable to read REG_INT_STAT\n"); | 226 | "unable to read REG_INT_STAT\n"); |
| 227 | goto exit; | 227 | return IRQ_NONE; |
| 228 | } | 228 | } |
| 229 | 229 | ||
| 230 | if (!reg) | ||
| 231 | return IRQ_NONE; | ||
| 232 | |||
| 230 | if (reg & INT_STAT_OVR_FLOW_INT) | 233 | if (reg & INT_STAT_OVR_FLOW_INT) |
| 231 | dev_warn(&keypad_data->client->dev, "overflow occurred\n"); | 234 | dev_warn(&keypad_data->client->dev, "overflow occurred\n"); |
| 232 | 235 | ||
| 233 | if (reg & INT_STAT_K_INT) | 236 | if (reg & INT_STAT_K_INT) |
| 234 | tca8418_read_keypad(keypad_data); | 237 | tca8418_read_keypad(keypad_data); |
| 235 | 238 | ||
| 236 | exit: | ||
| 237 | /* Clear all interrupts, even IRQs we didn't check (GPI, CAD, LCK) */ | 239 | /* Clear all interrupts, even IRQs we didn't check (GPI, CAD, LCK) */ |
| 238 | reg = 0xff; | 240 | reg = 0xff; |
| 239 | error = tca8418_write_byte(keypad_data, REG_INT_STAT, reg); | 241 | error = tca8418_write_byte(keypad_data, REG_INT_STAT, reg); |
| @@ -374,7 +376,9 @@ static int tca8418_keypad_probe(struct i2c_client *client, | |||
| 374 | client->irq = gpio_to_irq(client->irq); | 376 | client->irq = gpio_to_irq(client->irq); |
| 375 | 377 | ||
| 376 | error = request_threaded_irq(client->irq, NULL, tca8418_irq_handler, | 378 | error = request_threaded_irq(client->irq, NULL, tca8418_irq_handler, |
| 377 | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, | 379 | IRQF_TRIGGER_FALLING | |
| 380 | IRQF_SHARED | | ||
| 381 | IRQF_ONESHOT, | ||
| 378 | client->name, keypad_data); | 382 | client->name, keypad_data); |
| 379 | if (error) { | 383 | if (error) { |
| 380 | dev_dbg(&client->dev, | 384 | dev_dbg(&client->dev, |
