Re: [PATCH] extcon: max77843: convert to subsys_platform_driver()
From: Krzysztof Kozlowski
Date: Sat Nov 07 2026 - 05:54:33 EST
On 07/11/2026 02:07, Brian Masney wrote:
> Reduce boilerplate code in this driver and convert it over to use
> the macro subsys_platform_driver().
>
> Note that this driver is configured in the Kconfig to be a tristate,
> the driver doesn't have suppress_bind_attrs set, and there is no __exit
> function defined. This change will add an __exit function that
> unregisters the platform driver.
>
> Signed-off-by: Brian Masney <bmasney@xxxxxxxxxx>
> ---
> drivers/extcon/extcon-max77843.c | 6 +-----
> 1 file changed, 1 insertion(+), 5 deletions(-)
I am 99% sure that this driver can function as module platform driver,
because it has necessary MODULE_DEVICE_TABLE() and device is not needed
for early boot.
Nevertheless, this change itself is also correct.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>
Best regards,
Krzysztof