gpio-button-hotplug: do not error on interrupt attached keys
[openwrt/staging/wigyori.git] / package / kernel / gpio-button-hotplug / src / gpio-button-hotplug.c
index 2b39ec8f3be52e4c27986cf51844287829e032bd..522085bb2fa2e21b5b94fa4bf40e8bdd63daba9f 100644 (file)
@@ -506,6 +506,13 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
                        goto out;
                }
 
+               if (button->irq) {
+                       dev_err(dev, "skipping button %s (only gpio buttons supported)\n",
+                               button->desc);
+                       bdata->b = &pdata->buttons[i];
+                       continue;
+               }
+
                if (gpio_is_valid(button->gpio)) {
                        /* legacy platform data... but is it the lookup table? */
                        bdata->gpiod = devm_gpiod_get_index(dev, desc, i,