Re: [PATCH v2] Input: usbtouchscreen - refactor endpoint lookup
From: Dmitry Torokhov
Date: Wed Apr 01 2026 - 15:39:10 EST
On Wed, Apr 01, 2026 at 10:22:12AM +0200, Johan Hovold wrote:
> Use the common USB helpers for looking up bulk and interrupt endpoints
> (and determining endpoint numbers) instead of open coding.
>
> Note that the NEXIO data interface has two bulk endpoints (see commit
> 5197424cdccc ("Input: usbtouchscreen - add NEXIO (or iNexio) support")
> for the descriptors).
>
> The lookup in probe handles both bulk-in and interrupt-in endpoints and
> was added to handle NEXIO devices. Replace the open coded lookup with a
> lookup for the common interrupt endpoint and an explicit fallback
> accepting a bulk endpoint.
>
> This iterates over the (two) endpoints twice for NEXIO devices but makes
> it more clear what is going on.
>
> Signed-off-by: Johan Hovold <johan@xxxxxxxxxx>
Applied, thank you.
--
Dmitry