Skip to contentSkip to conversation

gpio_keys minor irq cleanup

PATCH New David Brownell 1 participant 1 message Dec 27, 2007

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

PATCH 1/1 gpio_keys minor irq cleanup

From: David Brownell <[email protected]>

Cleanup IRQ handling in gpio_keys: bail after handling the IRQ, and report IRQ_NONE if we never handle it.

Cc Phil Blundell <[email protected]>
Cc Dmitry Torokhov <[email protected]>

---
grr, not sure why that blank line got removed ... feel free to restore it.

drivers/input/keyboard/gpio_keys.c +2 -2
@@ -40,13 +40,13 @@ static irqreturn_t gpio_keys_isr(int irq
 		if (irq == gpio_to_irq(gpio)) {
 			unsigned int type = button->type ?: EV_KEY;
 			int state = (gpio_get_value(gpio) ? 1 : 0) ^ button->active_low;
-
 			input_event(input, type, button->code, !!state);
 			input_sync(input);
+			return IRQ_HANDLED;
 		}
 	}
 
-	return IRQ_HANDLED;
+	return IRQ_NONE;
 }
 
 static int __devinit gpio_keys_probe(struct platform_device *pdev)