aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/keyboard/gpio_keys.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index ce0d9090bbe9..b8b4876ac8d3 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -619,12 +619,11 @@ gpio_keys_get_devtree_pdata(struct device *dev)
619 i = 0; 619 i = 0;
620 for_each_child_of_node(node, pp) { 620 for_each_child_of_node(node, pp) {
621 int gpio = -1; 621 int gpio = -1;
622 int irq;
623 enum of_gpio_flags flags; 622 enum of_gpio_flags flags;
624 623
625 if (!of_find_property(pp, "gpios", NULL)) { 624 if (!of_find_property(pp, "gpios", NULL)) {
626 irq = irq_of_parse_and_map(pp, 0); 625 button->irq = irq_of_parse_and_map(pp, 0);
627 if (irq == 0) { 626 if (button->irq == 0) {
628 pdata->nbuttons--; 627 pdata->nbuttons--;
629 dev_warn(dev, "Found button without gpios or irqs\n"); 628 dev_warn(dev, "Found button without gpios or irqs\n");
630 continue; 629 continue;
@@ -644,7 +643,6 @@ gpio_keys_get_devtree_pdata(struct device *dev)
644 button = &pdata->buttons[i++]; 643 button = &pdata->buttons[i++];
645 644
646 button->gpio = gpio; 645 button->gpio = gpio;
647 button->irq = irq;
648 button->active_low = flags & OF_GPIO_ACTIVE_LOW; 646 button->active_low = flags & OF_GPIO_ACTIVE_LOW;
649 647
650 if (of_property_read_u32(pp, "linux,code", &button->code)) { 648 if (of_property_read_u32(pp, "linux,code", &button->code)) {