[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <17b0d90f-5e87-2d40-8b95-d5c25f9f27c7@igel.co.jp>
Date: Wed, 6 Nov 2019 15:41:31 +0900
From: Damian Hobson-Garcia <dhobsong@...l.co.jp>
To: Alexandru Ardelean <alexandru.ardelean@...log.com>,
linux-kernel@...r.kernel.org
Cc: gregkh@...uxfoundation.org,
Dragos Bogdan <dragos.bogdan@...log.com>
Subject: Re: [PATCH v2] uio: fix irq init with dt support & irq not defined
On 2019-11-05 4:32 p.m., Alexandru Ardelean wrote:
> This change also does a bit of a unification for the IRQ init code.
>
> But the actual problem is that UIO_IRQ_NONE == 0, so for the DT case where
> UIO_IRQ_NONE gets assigned to `uioinfo->irq`, a 2nd initialization will get
> triggered (for the IRQ) and this one will exit via `goto bad1`.
>
> As far as things seem to go, the only case where UIO_IRQ_NONE seems valid,
> is when using a device-tree. The driver has some legacy support for old
> platform_data structures. It looks like, for platform_data a non-existent
> IRQ is an invalid case (or was considered an invalid case).
> Which is why -ENXIO is treated only when a DT is used.
>
> Signed-off-by: Dragos Bogdan <dragos.bogdan@...log.com>
> Signed-off-by: Alexandru Ardelean <alexandru.ardelean@...log.com>
> ---
>
> Changelog v1 -> v2:
> * removed `int irq` variable ; was omitted when porting the patch to a
> newer kernel base
>
This also brings the implementation in line with the what is done in
uio_pdrv_genirq.c
Acked-by: Damian Hobson-Garcia <dhobsong@...l.co.jp>
Powered by blists - more mailing lists