]> git.ipfire.org Git - thirdparty/linux.git/commit
ACPI: driver: Do not set acpi_device_class() unnecessarily
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 13 Mar 2026 13:00:41 +0000 (14:00 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 13 Mar 2026 15:48:26 +0000 (16:48 +0100)
commite18947038bf4f39d47cdba511f85a9af668d56e1
treec7056c71fc10828ee80bbe07188c3841ee8560ee
parent76866c912ac8639965861c648fa234ab61c0e72d
ACPI: driver: Do not set acpi_device_class() unnecessarily

Several core ACPI device drivers set acpi_device_class() for the given
struct acpi_device to whatever they like, but that value is never used
unless the driver itself uses it and, sadly, they neglect to clear it on
remove.  Since the only one of them still using acpi_device_class()
after previous changes is the button driver, update the others to stop
setting it in vain.  Also drop the related device class sybmols that
become redundant.

Since the ACPI button driver continues to use acpi_device_class(), make
it clear the struct field represented by acpi_device_class() in its
remove callback.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3706295.iIbC2pHGDl@rafael.j.wysocki
16 files changed:
drivers/acpi/ac.c
drivers/acpi/acpi_memhotplug.c
drivers/acpi/acpi_pad.c
drivers/acpi/acpi_processor.c
drivers/acpi/acpi_video.c
drivers/acpi/battery.c
drivers/acpi/button.c
drivers/acpi/ec.c
drivers/acpi/pci_link.c
drivers/acpi/pci_root.c
drivers/acpi/power.c
drivers/acpi/processor_driver.c
drivers/acpi/sbs.c
drivers/acpi/sbshc.c
drivers/acpi/thermal.c
include/acpi/processor.h