diff options
author | David Jander <david@protonic.nl> | 2011-06-14 05:00:54 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-06-16 15:41:48 -0400 |
commit | c609c05db10dcb020f6869186e548a0596a78896 (patch) | |
tree | d42fe679540080fe712a613f37372b9d4fca3b9d | |
parent | 8e46ea3ec8b132bffd989741e8d154accb623645 (diff) |
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>
-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: | |||
517 | 517 | ||
518 | static void pca953x_irq_teardown(struct pca953x_chip *chip) | 518 | static void pca953x_irq_teardown(struct pca953x_chip *chip) |
519 | { | 519 | { |
520 | if (chip->irq_base != -1) | 520 | if (chip->irq_base != -1) { |
521 | irq_free_descs(chip->irq_base, chip->gpio_chip.ngpio); | ||
521 | free_irq(chip->client->irq, chip); | 522 | free_irq(chip->client->irq, chip); |
523 | } | ||
522 | } | 524 | } |
523 | #else /* CONFIG_GPIO_PCA953X_IRQ */ | 525 | #else /* CONFIG_GPIO_PCA953X_IRQ */ |
524 | static int pca953x_irq_setup(struct pca953x_chip *chip, | 526 | static int pca953x_irq_setup(struct pca953x_chip *chip, |