Commit d850c6f4 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Walleij

gpio: xgene-sb: Drop extra check to call acpi_gpiochip_request_interrupts()

There is no need to have an additional check to call
acpi_gpiochip_request_interrupts(). Even without any interrupts available
the registered ACPI Event handlers can be useful for debugging purposes.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200512182721.55127-3-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent b24bc583
...@@ -290,10 +290,8 @@ static int xgene_gpio_sb_probe(struct platform_device *pdev) ...@@ -290,10 +290,8 @@ static int xgene_gpio_sb_probe(struct platform_device *pdev)
dev_info(&pdev->dev, "X-Gene GPIO Standby driver registered\n"); dev_info(&pdev->dev, "X-Gene GPIO Standby driver registered\n");
if (priv->nirq > 0) { /* Register interrupt handlers for GPIO signaled ACPI Events */
/* Register interrupt handlers for gpio signaled acpi events */ acpi_gpiochip_request_interrupts(&priv->gc);
acpi_gpiochip_request_interrupts(&priv->gc);
}
return ret; return ret;
} }
...@@ -302,9 +300,7 @@ static int xgene_gpio_sb_remove(struct platform_device *pdev) ...@@ -302,9 +300,7 @@ static int xgene_gpio_sb_remove(struct platform_device *pdev)
{ {
struct xgene_gpio_sb *priv = platform_get_drvdata(pdev); struct xgene_gpio_sb *priv = platform_get_drvdata(pdev);
if (priv->nirq > 0) { acpi_gpiochip_free_interrupts(&priv->gc);
acpi_gpiochip_free_interrupts(&priv->gc);
}
irq_domain_remove(priv->irq_domain); irq_domain_remove(priv->irq_domain);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment