mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
gpio/pca953x: Fix IRQ support.
It seems that in the normal case, IRQ_NOREQUEST needs to be explicitly cleared, otherwise claiming the interrupt fails. In the case of sparse interrupts, the descriptor needs to be allocated first. Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
parent
8e46ea3ec8
commit
c609c05db1
1 changed files with 3 additions and 1 deletions
|
@ -517,8 +517,10 @@ static int pca953x_irq_setup(struct pca953x_chip *chip,
|
||||||
|
|
||||||
static void pca953x_irq_teardown(struct pca953x_chip *chip)
|
static void pca953x_irq_teardown(struct pca953x_chip *chip)
|
||||||
{
|
{
|
||||||
if (chip->irq_base != -1)
|
if (chip->irq_base != -1) {
|
||||||
|
irq_free_descs(chip->irq_base, chip->gpio_chip.ngpio);
|
||||||
free_irq(chip->client->irq, chip);
|
free_irq(chip->client->irq, chip);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else /* CONFIG_GPIO_PCA953X_IRQ */
|
#else /* CONFIG_GPIO_PCA953X_IRQ */
|
||||||
static int pca953x_irq_setup(struct pca953x_chip *chip,
|
static int pca953x_irq_setup(struct pca953x_chip *chip,
|
||||||
|
|
Loading…
Reference in a new issue