Re: [PATCH 03/10] [v2] Input: stmpe-ts - use module alias instead of device table

From: Andy Shevchenko
Date: Wed Apr 09 2025 - 11:39:10 EST


On Wed, Apr 09, 2025 at 02:22:55PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
>
> When compile tested with W=1 on x86_64 with driver as built-in:
>
> stmpe-ts.c:371:34: error: unused variable 'stmpe_ts_ids' [-Werror,-Wunused-const-variable]
>
> Ideally this would be referenced from the platform_driver, but since
> the compatible string is already matched by the mfd driver for its
> parent device, that would break probing.
>
> In this case, the of_device_id table just serves as a module alias
> for loading the driver, while the device itself is probed using
> the platform device name.
>
> Remove the table and instead use a module alias that reflects how
> the driver is actually probed.

...

> +MODULE_ALIAS("platform:stmpe-ts");

Isn't the preferable way to have platform device ID table instead?
Krzysztof?

--
With Best Regards,
Andy Shevchenko