ACPI: AC: Replace acpi_driver with platform_driver
authorMichal Wilczynski <michal.wilczynski@intel.com>
Wed, 11 Oct 2023 08:33:31 +0000 (11:33 +0300)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 13 Oct 2023 18:11:29 +0000 (20:11 +0200)
commit5829046825ac89fffc60f2670bc564fda2c0155a
tree43e44778e420e0c1f99167e67052bd4a46cefd9d
parent616990c92e40e4721beb66c2f855915fc1f32aba
ACPI: AC: Replace acpi_driver with platform_driver

The AC 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 AC driver.

Suggested-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
[ rjw: Changelog edits, acpi_ac_notify() modifications fixup ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/ac.c