[PATCH 08/12] ACPI: APEI: GHES: use devm_blocking_notifier_chain_register()
From: Eliav Farber
Date: Thu Jul 23 2026 - 14:08:46 EST
Replace the blocking_notifier_chain_register() +
devm_add_action_or_reset() pattern with a single call to
devm_blocking_notifier_chain_register(), removing the
ghes_vendor_record_notifier_destroy() callback.
Signed-off-by: Eliav Farber <farbere@xxxxxxxxxx>
---
drivers/acpi/apei/ghes.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 3236a3ce79d6..3aa29dcd70da 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -689,21 +689,12 @@ void ghes_unregister_vendor_record_notifier(struct notifier_block *nb)
}
EXPORT_SYMBOL_GPL(ghes_unregister_vendor_record_notifier);
-static void ghes_vendor_record_notifier_destroy(void *nb)
-{
- ghes_unregister_vendor_record_notifier(nb);
-}
-
int devm_ghes_register_vendor_record_notifier(struct device *dev,
struct notifier_block *nb)
{
- int ret;
-
- ret = ghes_register_vendor_record_notifier(nb);
- if (ret)
- return ret;
-
- return devm_add_action_or_reset(dev, ghes_vendor_record_notifier_destroy, nb);
+ return devm_blocking_notifier_chain_register(dev,
+ &vendor_record_notify_list,
+ nb);
}
EXPORT_SYMBOL_GPL(devm_ghes_register_vendor_record_notifier);
--
2.47.3