Commit 6e7e5c7f authored by Thierry Reding's avatar Thierry Reding Committed by Greg Kroah-Hartman

hwmon: pwm-fan: Use platform_get_irq_optional()

The PWM fan interrupt is optional, so we don't want an error message in
the kernel log if it wasn't specified.
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Reviewed-by: default avatarStephen Boyd <swboyd@chromium.org>
Acked-by: default avatarGuenter Roeck <linux@roeck-us.net>
Acked-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://lore.kernel.org/r/20190828083411.2496-2-thierry.reding@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8973ea47
......@@ -304,7 +304,7 @@ static int pwm_fan_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ctx);
ctx->irq = platform_get_irq(pdev, 0);
ctx->irq = platform_get_irq_optional(pdev, 0);
if (ctx->irq == -EPROBE_DEFER)
return ctx->irq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment