summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2019-08-28 04:34:11 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-28 16:52:30 -0400
commit6e7e5c7fbc1c84e4ac657e0cb5bf9ca24492cc8f (patch)
treec1a4a97c3b29b0df364af766757cba818cded0fa
parent8973ea47901c81a1912bd05f1577bed9b5b52506 (diff)
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: Thierry Reding <treding@nvidia.com> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://lore.kernel.org/r/20190828083411.2496-2-thierry.reding@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/hwmon/pwm-fan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c
index 54c0ff00d67f..42ffd2e5182d 100644
--- a/drivers/hwmon/pwm-fan.c
+++ b/drivers/hwmon/pwm-fan.c
@@ -304,7 +304,7 @@ static int pwm_fan_probe(struct platform_device *pdev)
304 304
305 platform_set_drvdata(pdev, ctx); 305 platform_set_drvdata(pdev, ctx);
306 306
307 ctx->irq = platform_get_irq(pdev, 0); 307 ctx->irq = platform_get_irq_optional(pdev, 0);
308 if (ctx->irq == -EPROBE_DEFER) 308 if (ctx->irq == -EPROBE_DEFER)
309 return ctx->irq; 309 return ctx->irq;
310 310