Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: Don't try to flag IRQ 0 as a wm831x wake source

If we've not got a primary IRQ we shouldn't be trying to flag IRQ 0 as a
wake source.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>

authored by

Mark Brown and committed by
Samuel Ortiz
4492c4c3 6592ebb3

+12 -11
+12 -11
drivers/mfd/wm831x-irq.c
··· 565 565 wm831x_set_bits(wm831x, WM831X_IRQ_CONFIG, 566 566 WM831X_IRQ_OD, i); 567 567 568 - /* Try to flag /IRQ as a wake source; there are a number of 569 - * unconditional wake sources in the PMIC so this isn't 570 - * conditional but we don't actually care *too* much if it 571 - * fails. 572 - */ 573 - ret = enable_irq_wake(irq); 574 - if (ret != 0) { 575 - dev_warn(wm831x->dev, "Can't enable IRQ as wake source: %d\n", 576 - ret); 577 - } 578 - 579 568 wm831x->irq = irq; 580 569 581 570 /* Register them with genirq */ ··· 586 597 } 587 598 588 599 if (irq) { 600 + /* Try to flag /IRQ as a wake source; there are a number of 601 + * unconditional wake sources in the PMIC so this isn't 602 + * conditional but we don't actually care *too* much if it 603 + * fails. 604 + */ 605 + ret = enable_irq_wake(irq); 606 + if (ret != 0) { 607 + dev_warn(wm831x->dev, 608 + "Can't enable IRQ as wake source: %d\n", 609 + ret); 610 + } 611 + 589 612 ret = request_threaded_irq(irq, NULL, wm831x_irq_thread, 590 613 IRQF_TRIGGER_LOW | IRQF_ONESHOT, 591 614 "wm831x", wm831x);