diff options
author | David Jander <david@protonic.nl> | 2011-06-14 11:00:54 +0200 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-06-16 21:41:48 +0200 |
commit | c609c05db10dcb020f6869186e548a0596a78896 (patch) | |
tree | d42fe679540080fe712a613f37372b9d4fca3b9d /drivers/gpio | |
parent | Merge branch 'for_3.1/gpio-cleanup' of git://git.kernel.org/pub/scm/linux/ker... (diff) | |
download | linux-c609c05db10dcb020f6869186e548a0596a78896.tar.xz linux-c609c05db10dcb020f6869186e548a0596a78896.zip |
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>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-pca953x.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c index 4b8446e98de5..5e4d3f23156a 100644 --- a/drivers/gpio/gpio-pca953x.c +++ b/drivers/gpio/gpio-pca953x.c @@ -517,8 +517,10 @@ out_failed: 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); + } } #else /* CONFIG_GPIO_PCA953X_IRQ */ static int pca953x_irq_setup(struct pca953x_chip *chip, |