[PATCH 08/12] ACPI: APEI: GHES: use devm_blocking_notifier_chain_register()
Eliav Farber <[email protected]>
| Newsgroups | gmane.linux.kernel.iio,gmane.linux.acpi.devel,gmane.linux.kernel,gmane.linux.kernel.gpio,gmane.linux.pwm,gmane.linux.kernel.input,gmane.linux.drivers.platform.x86.devel |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> --- 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