mfd: Ignore non-GPIO IRQs when setting wm831x IRQ types
The driver was originally tested with an additional patch which made this unneeded but that patch had issuges and got lost on the way to mainline, causing problems when the errors are reported. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> Cc: stable@kernel.org
This commit is contained in:
Родитель
899611ee7d
Коммит
c9d66d3515
|
@ -394,8 +394,13 @@ static int wm831x_irq_set_type(unsigned int irq, unsigned int type)
|
||||||
|
|
||||||
irq = irq - wm831x->irq_base;
|
irq = irq - wm831x->irq_base;
|
||||||
|
|
||||||
if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11)
|
if (irq < WM831X_IRQ_GPIO_1 || irq > WM831X_IRQ_GPIO_11) {
|
||||||
return -EINVAL;
|
/* Ignore internal-only IRQs */
|
||||||
|
if (irq >= 0 && irq < WM831X_NUM_IRQS)
|
||||||
|
return 0;
|
||||||
|
else
|
||||||
|
return -EINVAL;
|
||||||
|
}
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case IRQ_TYPE_EDGE_BOTH:
|
case IRQ_TYPE_EDGE_BOTH:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче