]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ACPI: TAD: Use devres for all driver cleanup
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 22 Apr 2026 15:25:46 +0000 (17:25 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 27 Apr 2026 19:57:09 +0000 (21:57 +0200)
commit77dd14ab1b575328745644136ba758d394e10fbc
tree98be25390e9dea36a9367a78f87c48834f4532a2
parent88b2670ea6505c6cfd1478ba34b041c60c4281dc
ACPI: TAD: Use devres for all driver cleanup

The code in acpi_tad_remove() needs to run after the unregistration of
the devres-managed RTC class device so that it doesn't race with the
class callbacks of the latter.

To make that happen, pass it to devm_add_action_or_reset() before
registering the RTC class device.

Fixes: 7572dcabe38d ("ACPI: TAD: Add alarm support to the RTC class device interface")
Fixes: 8a1e7f4b1764 ("ACPI: TAD: Add RTC class device interface")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Link: https://patch.msgid.link/14001754.uLZWGnKmhe@rafael.j.wysocki
drivers/acpi/acpi_tad.c