Thread (24 messages) read the whole thread 24 messages, 7 authors, 3d ago

Re: [PATCH v4 10/13] platform/x86: uniwill-wmi: use devm_blocking_notifier_chain_register()

From: Armin Wolf <W_Armin@gmx.de>
Date: 2026-07-27 18:49:03
Also in: linux-acpi, linux-gpio, linux-iio, linux-pwm, lkml, platform-driver-x86

Am 26.07.26 um 12:17 schrieb Eliav Farber:
Replace the blocking_notifier_chain_register() +
devm_add_action_or_reset() pattern with a single call to
devm_blocking_notifier_chain_register(), removing the
devm_uniwill_wmi_unregister_notifier() callback.
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
quoted hunk ↗ jump to hunk
Signed-off-by: Eliav Farber <redacted>
---
  drivers/platform/x86/uniwill/uniwill-wmi.c | 17 +++--------------
  1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/platform/x86/uniwill/uniwill-wmi.c b/drivers/platform/x86/uniwill/uniwill-wmi.c
index afcbfa4f7552..2ffa29a829ee 100644
--- a/drivers/platform/x86/uniwill/uniwill-wmi.c
+++ b/drivers/platform/x86/uniwill/uniwill-wmi.c
@@ -26,22 +26,11 @@
  
  static BLOCKING_NOTIFIER_HEAD(uniwill_wmi_chain_head);
  
-static void devm_uniwill_wmi_unregister_notifier(void *data)
-{
-	struct notifier_block *nb = data;
-
-	blocking_notifier_chain_unregister(&uniwill_wmi_chain_head, nb);
-}
-
  int devm_uniwill_wmi_register_notifier(struct device *dev, struct notifier_block *nb)
  {
-	int ret;
-
-	ret = blocking_notifier_chain_register(&uniwill_wmi_chain_head, nb);
-	if (ret < 0)
-		return ret;
-
-	return devm_add_action_or_reset(dev, devm_uniwill_wmi_unregister_notifier, nb);
+	return devm_blocking_notifier_chain_register(dev,
+						     &uniwill_wmi_chain_head,
+						     nb);
  }
  
  static void uniwill_wmi_notify(struct wmi_device *wdev, union acpi_object *obj)
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help