提交 72b38caf 编写于 作者: B Baruch Siach 提交者: Linus Walleij

gpio: pca953x: suppress interrupts warning when not applicable

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: NBaruch Siach <baruch@tkos.co.il>
Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 122d00f7
...@@ -708,7 +708,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, ...@@ -708,7 +708,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
{ {
struct i2c_client *client = chip->client; 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"); dev_warn(&client->dev, "interrupt support not compiled in\n");
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册