From: Eliav Farber <farbere@amazon.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
"Hans de Goede" <hansg@kernel.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Armin Wolf" <W_Armin@gmx.de>,
"Sebastian Reichel" <sre@kernel.org>,
"Andrew Morton" <akpm@linux-foundation.org>
Cc: Eliav Farber <farbere@amazon.com>,
<platform-driver-x86@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: [PATCH v6 1/7] platform/x86: bitland-mifs-wmi: use devm_blocking_notifier_chain_register()
Date: Fri, 13 Nov 2026 10:42:03 +0000 [thread overview]
Message-ID: <20261113104218.32566-2-farbere@amazon.com> (raw)
In-Reply-To: <20261113104218.32566-1-farbere@amazon.com>
Replace the blocking_notifier_chain_register() +
devm_add_action_or_reset() pattern with a single call to
devm_blocking_notifier_chain_register(), removing the
bitland_notifier_unregister() callback.
Signed-off-by: Eliav Farber <farbere@amazon.com>
---
Changes in v6:
- Rebased onto v7.4-rc1. No functional change since v5.
drivers/platform/x86/bitland-mifs-wmi.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/platform/x86/bitland-mifs-wmi.c b/drivers/platform/x86/bitland-mifs-wmi.c
index 6dd901e54d9d..617c369c63c5 100644
--- a/drivers/platform/x86/bitland-mifs-wmi.c
+++ b/drivers/platform/x86/bitland-mifs-wmi.c
@@ -621,13 +621,6 @@ static const struct key_entry bitland_mifs_wmi_keymap[] = {
{ KE_END, 0 }
};
-static void bitland_notifier_unregister(void *data)
-{
- struct notifier_block *nb = data;
-
- blocking_notifier_chain_unregister(&bitland_notifier_list, nb);
-}
-
static int bitland_notifier_callback(struct notifier_block *nb,
unsigned long action, void *data)
{
@@ -727,13 +720,9 @@ static int bitland_mifs_wmi_probe(struct wmi_device *wdev, const void *context)
return ret;
drv_data->notifier.notifier_call = bitland_notifier_callback;
- ret = blocking_notifier_chain_register(&bitland_notifier_list, &drv_data->notifier);
- if (ret)
- return ret;
-
- return devm_add_action_or_reset(&wdev->dev,
- bitland_notifier_unregister,
- &drv_data->notifier);
+ return devm_blocking_notifier_chain_register(&wdev->dev,
+ &bitland_notifier_list,
+ &drv_data->notifier);
}
static void bitland_mifs_wmi_notify(struct wmi_device *wdev,
--
2.47.3
next prev parent reply other threads:[~2026-11-13 10:42 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-13 10:42 [PATCH v6 0/7] notifier: convert remaining drivers to device-managed registration Eliav Farber
2026-11-13 10:42 ` Eliav Farber [this message]
2026-11-13 10:42 ` [PATCH v6 2/7] Input: adp5585: use devm_blocking_notifier_chain_register() Eliav Farber
2026-11-13 10:42 ` [PATCH v6 3/7] ACPI: APEI: GHES: remove unused ghes_{,un}register_vendor_record_notifier() Eliav Farber
2026-11-13 11:28 ` Andy Shevchenko
2026-11-13 10:42 ` [PATCH v6 4/7] ACPI: APEI: GHES: use devm_blocking_notifier_chain_register() Eliav Farber
2026-11-13 11:03 ` [PATCH v6 0/7] notifier: convert remaining drivers to device-managed registration Eliav Farber
2026-11-13 11:46 ` Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261113104218.32566-2-farbere@amazon.com \
--to=farbere@amazon.com \
--cc=W_Armin@gmx.de \
--cc=akpm@linux-foundation.org \
--cc=dmitry.torokhov@gmail.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®