]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
Input: usbtouchscreen - refactor endpoint lookup
authorJohan Hovold <johan@kernel.org>
Wed, 1 Apr 2026 08:22:12 +0000 (10:22 +0200)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 1 Apr 2026 17:37:38 +0000 (10:37 -0700)
commitf13b7800929df0df0ba2407226ba1b627b482c92
tree5e1fcf166f07f45506d5e2ec6f3b655c44c2e3a5
parentdf53055c540fe8850f587a6ef0d6944bdd909483
Input: usbtouchscreen - refactor endpoint lookup

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@kernel.org>
Link: https://patch.msgid.link/20260401082212.2180434-1-johan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/usbtouchscreen.c