lkml.org 
[lkml]   [2021]   [Mar]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 1/3] gpio: tqmx86: really make IRQ optional
On Wed, Mar 31, 2021 at 2:37 PM Matthias Schiffer
<matthias.schiffer@ew.tq-group.com> wrote:
>
> The tqmx86 MFD driver was passing IRQ 0 for "no IRQ" in the past. This
> causes warnings with newer kernels.
>
> Prepare the gpio-tqmx86 driver for the fixed MFD driver by handling a
> missing IRQ properly.

...

> - irq = platform_get_irq(pdev, 0);
> - if (irq < 0)
> + irq = platform_get_irq_optional(pdev, 0);

> + if (irq < 0 && irq != -ENXIO)
> return irq;

This is a dead code now. I suggest you to do the opposite, i.e.
if (irq < 0)
irq = 0;

In such a case below change is not required.

...

> - if (irq) {
> + if (irq > 0) {
> struct irq_chip *irq_chip = &gpio->irq_chip;
> u8 irq_status;


--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2021-03-31 14:31    [W:0.072 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site