]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
hwmon: (pwm-fan) disable threaded interrupts
authorJohn Keeping <jkeeping@inmusicbrands.com>
Thu, 10 Apr 2025 18:03:57 +0000 (19:03 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Wed, 23 Apr 2025 14:18:27 +0000 (07:18 -0700)
The interrupt handler here just increments an atomic counter, jumping to
a threaded handler risks missing tachometer pulses and is likely to be
more expensive than the simple atomic increment.

Signed-off-by: John Keeping <jkeeping@inmusicbrands.com>
Link: https://lore.kernel.org/r/20250410180357.2258822-1-jkeeping@inmusicbrands.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/pwm-fan.c

index d506a5e7e033dfe5cd48b0546d93f90f091ccb1a..2df294793f6eebe11dff7622d82576644d802293 100644 (file)
@@ -620,8 +620,8 @@ static int pwm_fan_probe(struct platform_device *pdev)
                if (tach->irq == -EPROBE_DEFER)
                        return tach->irq;
                if (tach->irq > 0) {
-                       ret = devm_request_irq(dev, tach->irq, pulse_handler, 0,
-                                              pdev->name, tach);
+                       ret = devm_request_irq(dev, tach->irq, pulse_handler,
+                                              IRQF_NO_THREAD, pdev->name, tach);
                        if (ret) {
                                dev_err(dev,
                                        "Failed to request interrupt: %d\n",