]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ACPI: AC: Switch over to devres-based resource management
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 21 May 2026 14:02:00 +0000 (16:02 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 25 May 2026 14:43:51 +0000 (16:43 +0200)
commit026a7835bfda409661aafd5fcdf6b97878b21dc7
treeda2aa0dff23e88604f6d3b60a1ab6518eada692f
parent198541ad53c0d0d891fedea4098f9953a0f566c0
ACPI: AC: Switch over to devres-based resource management

Use devm_kzalloc() for allocating memory, devm_power_supply_register()
for registering a power supply class device and the newly introduced
devm_acpi_install_notify_handler() for installing an ACPI notify handler.

Note that the code ordering change related to the third of the above
modifications does not matter because there is no order dependency
between the battery notifier and the ACPI notify handler.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/3422377.44csPzL39Z@rafael.j.wysocki
drivers/acpi/ac.c