Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90adf98d authored by Valentin Rothberg's avatar Valentin Rothberg Committed by Sebastian Reichel
Browse files

wm831x_power: Use IRQF_ONESHOT to request threaded IRQs



Since commit 1c6c6952 ("genirq: Reject bogus threaded irq requests")
threaded IRQs without a primary handler need to be requested with
IRQF_ONESHOT, otherwise the request will fail.

scripts/coccinelle/misc/irqf_oneshot.cocci detected this issue.

Fixes: b5874f33 ("wm831x_power: Use genirq")
Signed-off-by: default avatarValentin Rothberg <valentinrothberg@gmail.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 3636859b
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -573,7 +573,7 @@ static int wm831x_power_probe(struct platform_device *pdev)

	irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "SYSLO"));
	ret = request_threaded_irq(irq, NULL, wm831x_syslo_irq,
				   IRQF_TRIGGER_RISING, "System power low",
				   IRQF_TRIGGER_RISING | IRQF_ONESHOT, "System power low",
				   power);
	if (ret != 0) {
		dev_err(&pdev->dev, "Failed to request SYSLO IRQ %d: %d\n",
@@ -583,7 +583,7 @@ static int wm831x_power_probe(struct platform_device *pdev)

	irq = wm831x_irq(wm831x, platform_get_irq_byname(pdev, "PWR SRC"));
	ret = request_threaded_irq(irq, NULL, wm831x_pwr_src_irq,
				   IRQF_TRIGGER_RISING, "Power source",
				   IRQF_TRIGGER_RISING | IRQF_ONESHOT, "Power source",
				   power);
	if (ret != 0) {
		dev_err(&pdev->dev, "Failed to request PWR SRC IRQ %d: %d\n",
@@ -596,7 +596,7 @@ static int wm831x_power_probe(struct platform_device *pdev)
				 platform_get_irq_byname(pdev,
							 wm831x_bat_irqs[i]));
		ret = request_threaded_irq(irq, NULL, wm831x_bat_irq,
					   IRQF_TRIGGER_RISING,
					   IRQF_TRIGGER_RISING | IRQF_ONESHOT,
					   wm831x_bat_irqs[i],
					   power);
		if (ret != 0) {