Re: [PATCH v2] net: fjes: Drop fjes_acpi_driver and rework initialization

Simon Horman
2026-03-19T17:51:11Z

On Wed, Mar 18, 2026 at 02:43:55PM +0100, Rafael J. Wysocki wrote:
> From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
>
> The ACPI driver interface used by the Fujitsu Extended Socket (fjes)
> Network Device driver is redundant because its only role is to create
> a platform device the fjes platform driver can bind to, which can be
> done already at the module initialization time.
>
> Namely, acpi_find_extended_socket_device() looks for the requisite ACPI
> device object anyway and it may as well check its resources, and the
> platform device can be created when the ACPI object in question
> has been found (and it can be freed when the module is unloaded).
>
> Moreover, as a rule, it is better to avoid binding drivers directly to
> ACPI device objects [1].
>
> Accordingly, drop fjes_acpi_driver, adjust the module initialization
> and exit code as per the above and set the fwnode for the fjes platform
> device to point to the corresponding ACPI device object as its ACPI
> companion.
>
> While this is not expected to alter functionality, it changes sysfs
> layout and so it will be visible to user space.
>
> Link: https://lore.kernel.org/all/2396510.ElGaqSPkdT@rafael.j.wysocki/ [1]
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>
> v1 -> v2: Add platform device unregistration to the rollback path in
> fjes_init_module, as per
> https://lore.kernel.org/linux-acpi/CAJZ5v0g9BinHfQDS6hUvVHdLxDPvbv7ck=m1Bqa=+C3iE+vgxw@mail.gmail.com/

Thanks for the update.

Reviewed-by: Simon Horman <horms@kernel.org>