diff mbox series

[2/2] hwmon: pwm-fan: Use platform_get_irq_optional()

Message ID 20190828083411.2496-2-thierry.reding@gmail.com (mailing list archive)
State Not Applicable
Headers show
Series [1/2] driver core: platform: Introduce platform_get_irq_optional() | expand

Commit Message

Thierry Reding Aug. 28, 2019, 8:34 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

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>
---
 drivers/hwmon/pwm-fan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Bartlomiej Zolnierkiewicz Aug. 28, 2019, 9:10 a.m. UTC | #1
On 8/28/19 10:34 AM, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> 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>

Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/hwmon/pwm-fan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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)
>  
>  	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;
>
Guenter Roeck Aug. 28, 2019, 3:05 p.m. UTC | #2
On Wed, Aug 28, 2019 at 10:34:11AM +0200, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
> 
> 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>

Acked-by: Guenter Roeck <linux@roeck-us.net>

I assume that Greg will pick up this patch.

Guenter

> ---
>  drivers/hwmon/pwm-fan.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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)
>  
>  	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;
>  
> -- 
> 2.22.0
>
Greg KH Aug. 28, 2019, 3:38 p.m. UTC | #3
On Wed, Aug 28, 2019 at 08:05:22AM -0700, Guenter Roeck wrote:
> On Wed, Aug 28, 2019 at 10:34:11AM +0200, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> > 
> > 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>
> 
> Acked-by: Guenter Roeck <linux@roeck-us.net>
> 
> I assume that Greg will pick up this patch.

Will do, thanks.

greg k-h
Stephen Boyd Aug. 28, 2019, 3:47 p.m. UTC | #4
Quoting Thierry Reding (2019-08-28 01:34:11)
> From: Thierry Reding <treding@nvidia.com>
> 
> 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>
diff mbox series

Patch

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)
 
 	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;