Re: [PATCH v1 4/6] ACPI: acpi_video: Replace acpi_driver with platform_driver

From: Andy Shevchenko
Date: Thu Oct 26 2023 - 08:24:19 EST


On Wed, Oct 25, 2023 at 02:18:04PM +0300, Michal Wilczynski wrote:
> The acpi_video driver uses struct acpi_driver to register itself while it
> would be more logically consistent to use struct platform_driver for this
> purpose, because the corresponding platform device is present and the
> role of struct acpi_device is to amend the other bus types. ACPI devices
> are not meant to be used as proper representation of hardware entities,
> but to collect information on those hardware entities provided by the
> platform firmware.
>
> Use struct platform_driver for registering the acpi_video driver.

...

> #include <linux/dmi.h>
> #include <linux/suspend.h>
> #include <linux/acpi.h>
> +#include <linux/platform_device.h>
> #include <acpi/video.h>
> #include <linux/uaccess.h>

Despite this being unsorted I would squeeze to the most sorted part of it,
i.e. with the given context the new inclusion is good to have after dmi.h
(but in full context it might be even better spot).

--
With Best Regards,
Andy Shevchenko