diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-29 14:57:53 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-29 14:57:53 -0700 |
commit | 9d457c60ba783c709c750b851d07f0ac8af78ce9 (patch) | |
tree | 9e28956058607759b3ef63c0fb6fc9a0e3d9a810 /drivers/mfd/wm831x-irq.c | |
parent | f12f662f29d5801e598c6bb4a71e54b2de218f72 (diff) | |
parent | 90182317a9e383474613aa60e9d61d57bdf17c3e (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6:
mfd: Fix max8925 irq control bit incorrect setting
mfd: Ignore non-GPIO IRQs when setting wm831x IRQ types
Diffstat (limited to 'drivers/mfd/wm831x-irq.c')
-rw-r--r-- | drivers/mfd/wm831x-irq.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/mfd/wm831x-irq.c b/drivers/mfd/wm831x-irq.c index 7dabe4dbd37..294183b6260 100644 --- a/drivers/mfd/wm831x-irq.c +++ b/drivers/mfd/wm831x-irq.c @@ -394,8 +394,13 @@ static int wm831x_irq_set_type(unsigned int irq, unsigned int type) irq = irq - wm831x->irq_base; - if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11) - return -EINVAL; + if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11) { + /* Ignore internal-only IRQs */ + if (irq >= 0 && irq < WM831X_NUM_IRQS) + return 0; + else + return -EINVAL; + } switch (type) { case IRQ_TYPE_EDGE_BOTH: |