rtc: cmos: Disable ACPI RTC event on removal
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 9 Nov 2022 12:15:36 +0000 (13:15 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Tue, 15 Nov 2022 20:07:14 +0000 (21:07 +0100)
commit83ebb7b3036d151ee39a4a752018665648fc3bd4
tree61459796c15c776acdd64b8088e95b889b4d25e2
parentd13e9ad9f5146f066a5c5a1cc993d09e4fb21ead
rtc: cmos: Disable ACPI RTC event on removal

Make cmos_do_remove() drop the ACPI RTC fixed event handler so as to
prevent it from operating on stale data in case the event triggers
after driver removal.

Fixes: 311ee9c151ad ("rtc: cmos: allow using ACPI for RTC alarm instead of HPET")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Zhang Rui <rui.zhang@intel.com>
Tested-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/2224609.iZASKD2KPV@kreacher
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-cmos.c