gpio: pca953x: suppress interrupts warning when not applicable
authorBaruch Siach <baruch@tkos.co.il>
Thu, 21 Jun 2018 13:38:46 +0000 (16:38 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 2 Jul 2018 14:00:49 +0000 (16:00 +0200)
Don't warn about missing interrupts support when the parent interrupt is
not defined. Enabling interrupts support would not make it work anyway.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-pca953x.c

index c55ad157e820028ecd072b8bb36f8fd7cb1faa2a..023a32cfac42da79789af9026f394eb1fe4a5d5c 100644 (file)
@@ -708,7 +708,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
 {
        struct i2c_client *client = chip->client;
 
-       if (irq_base != -1 && (chip->driver_data & PCA_INT))
+       if (client->irq && irq_base != -1 && (chip->driver_data & PCA_INT))
                dev_warn(&client->dev, "interrupt support not compiled in\n");
 
        return 0;