* [PATCH v6 1/7] platform/x86: bitland-mifs-wmi: use devm_blocking_notifier_chain_register()
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
2026-11-13 10:42 ` [PATCH v6 2/7] Input: adp5585: " Eliav Farber
` (4 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Eliav Farber @ 2026-11-13 10:42 UTC (permalink / raw)
To: Rafael J. Wysocki, Dmitry Torokhov, Laurent Pinchart,
Hans de Goede, Ilpo Järvinen, Armin Wolf, Sebastian Reichel,
Andrew Morton
Cc: Eliav Farber, platform-driver-x86, linux-kernel
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
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v6 2/7] Input: adp5585: use devm_blocking_notifier_chain_register()
2026-11-13 10:42 [PATCH v6 0/7] notifier: convert remaining drivers to device-managed registration Eliav Farber
2026-11-13 10:42 ` [PATCH v6 1/7] platform/x86: bitland-mifs-wmi: use devm_blocking_notifier_chain_register() Eliav Farber
@ 2026-11-13 10:42 ` Eliav Farber
2026-11-13 10:42 ` [PATCH v6 3/7] ACPI: APEI: GHES: remove unused ghes_{,un}register_vendor_record_notifier() Eliav Farber
` (3 subsequent siblings)
5 siblings, 0 replies; 8+ messages in thread
From: Eliav Farber @ 2026-11-13 10:42 UTC (permalink / raw)
To: Rafael J. Wysocki, Dmitry Torokhov, Laurent Pinchart,
Hans de Goede, Ilpo Järvinen, Armin Wolf, Sebastian Reichel,
Andrew Morton
Cc: Eliav Farber, linux-gpio, linux-pwm, linux-input, linux-kernel
Replace the blocking_notifier_chain_register() +
devm_add_action_or_reset() pattern with a single call to
devm_blocking_notifier_chain_register(), removing the
adp5585_keys_unreg_notifier() callback.
Signed-off-by: Eliav Farber <farbere@amazon.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---
Changes in v6:
- Rebased onto v7.4-rc1. No functional change since v5.
- Dmitry Torokhov's Acked-by retained; the patch is unchanged since v1,
when it was given.
drivers/input/keyboard/adp5585-keys.c | 18 +++---------------
1 file changed, 3 insertions(+), 15 deletions(-)
diff --git a/drivers/input/keyboard/adp5585-keys.c b/drivers/input/keyboard/adp5585-keys.c
index ee2c3cb0445f..b27390d0e706 100644
--- a/drivers/input/keyboard/adp5585-keys.c
+++ b/drivers/input/keyboard/adp5585-keys.c
@@ -254,15 +254,6 @@ static int adp5585_keys_ev_handle(struct notifier_block *nb, unsigned long key,
return NOTIFY_STOP;
}
-static void adp5585_keys_unreg_notifier(void *data)
-{
- struct adp5585_kpad *kpad = data;
- struct adp5585_dev *adp5585 = dev_get_drvdata(kpad->dev->parent);
-
- blocking_notifier_chain_unregister(&adp5585->event_notifier,
- &kpad->nb);
-}
-
static int adp5585_keys_probe(struct platform_device *pdev)
{
const struct platform_device_id *id = platform_get_device_id(pdev);
@@ -318,12 +309,9 @@ static int adp5585_keys_probe(struct platform_device *pdev)
return error;
kpad->nb.notifier_call = adp5585_keys_ev_handle;
- error = blocking_notifier_chain_register(&adp5585->event_notifier,
- &kpad->nb);
- if (error)
- return error;
-
- error = devm_add_action_or_reset(dev, adp5585_keys_unreg_notifier, kpad);
+ error = devm_blocking_notifier_chain_register(dev,
+ &adp5585->event_notifier,
+ &kpad->nb);
if (error)
return error;
--
2.47.3
^ permalink raw reply [flat|nested] 8+ messages in thread* [PATCH v6 3/7] ACPI: APEI: GHES: remove unused ghes_{,un}register_vendor_record_notifier()
2026-11-13 10:42 [PATCH v6 0/7] notifier: convert remaining drivers to device-managed registration Eliav Farber
2026-11-13 10:42 ` [PATCH v6 1/7] platform/x86: bitland-mifs-wmi: use devm_blocking_notifier_chain_register() Eliav Farber
2026-11-13 10:42 ` [PATCH v6 2/7] Input: adp5585: " Eliav Farber
@ 2026-11-13 10:42 ` 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
` (2 subsequent siblings)
5 siblings, 1 reply; 8+ messages in thread
From: Eliav Farber @ 2026-11-13 10:42 UTC (permalink / raw)
To: Rafael J. Wysocki, Dmitry Torokhov, Laurent Pinchart,
Hans de Goede, Ilpo Järvinen, Armin Wolf, Sebastian Reichel,
Andrew Morton
Cc: Eliav Farber, Jonathan Cameron, Tony Luck, Borislav Petkov,
Hanjun Guo, Mauro Carvalho Chehab, Shuai Xue, Len Brown,
Maciej Wieczor-Retman, Pawel Chmielewski, Dave Jiang,
Fabio M. De Francesco, Breno Leitao, Terry Bowman, linux-acpi,
linux-kernel, acpica-devel, Andy Shevchenko, Kai-Heng Feng
Remove ghes_register_vendor_record_notifier() and
ghes_unregister_vendor_record_notifier() along with their
EXPORT_SYMBOL_GPL()s and ghes.h declarations, since there are no
remaining in-tree callers - all users go through
devm_ghes_register_vendor_record_notifier() instead.
Inline the register/unregister calls directly into
devm_ghes_register_vendor_record_notifier() and its destroy callback.
Signed-off-by: Eliav Farber <farbere@amazon.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
---
Changes in v6:
- Rebased onto v7.4-rc1.
- Replaced an em dash in the commit message with an ASCII hyphen. No
change to the code.
- Jonathan Cameron's Reviewed-by retained; the code is unchanged since
v4, when it was given.
Changes in v4:
- Split from the devm conversion patch into its own commit
(Andy Shevchenko)
Changes in v2:
- New patch: remove unused ghes_register_vendor_record_notifier() and
ghes_unregister_vendor_record_notifier() along with their
EXPORT_SYMBOL_GPL()s and ghes.h declarations, since there are no
in-tree callers (Jonathan Cameron)
drivers/acpi/apei/ghes.c | 16 +++-------------
include/acpi/ghes.h | 16 ----------------
2 files changed, 3 insertions(+), 29 deletions(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 663dc2e601cf..a81ffacb16d0 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -679,29 +679,19 @@ static void ghes_handle_aer(struct acpi_hest_generic_data *gdata)
static BLOCKING_NOTIFIER_HEAD(vendor_record_notify_list);
-int ghes_register_vendor_record_notifier(struct notifier_block *nb)
+static void ghes_vendor_record_notifier_destroy(void *data)
{
- return blocking_notifier_chain_register(&vendor_record_notify_list, nb);
-}
-EXPORT_SYMBOL_GPL(ghes_register_vendor_record_notifier);
+ struct notifier_block *nb = data;
-void ghes_unregister_vendor_record_notifier(struct notifier_block *nb)
-{
blocking_notifier_chain_unregister(&vendor_record_notify_list, 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);
+ ret = blocking_notifier_chain_register(&vendor_record_notify_list, nb);
if (ret)
return ret;
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
index 7acf209061ea..b01b3f6d0868 100644
--- a/include/acpi/ghes.h
+++ b/include/acpi/ghes.h
@@ -55,22 +55,6 @@ enum {
};
#ifdef CONFIG_ACPI_APEI_GHES
-/**
- * ghes_register_vendor_record_notifier - register a notifier for vendor
- * records that the kernel would otherwise ignore.
- * @nb: pointer to the notifier_block structure of the event handler.
- *
- * return 0 : SUCCESS, non-zero : FAIL
- */
-int ghes_register_vendor_record_notifier(struct notifier_block *nb);
-
-/**
- * ghes_unregister_vendor_record_notifier - unregister the previously
- * registered vendor record notifier.
- * @nb: pointer to the notifier_block structure of the vendor record handler.
- */
-void ghes_unregister_vendor_record_notifier(struct notifier_block *nb);
-
/**
* devm_ghes_register_vendor_record_notifier - device-managed vendor
* record notifier registration.
--
2.47.3
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v6 3/7] ACPI: APEI: GHES: remove unused ghes_{,un}register_vendor_record_notifier()
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
0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2026-11-13 11:28 UTC (permalink / raw)
To: Eliav Farber
Cc: Rafael J. Wysocki, Dmitry Torokhov, Laurent Pinchart,
Hans de Goede, Ilpo Järvinen, Armin Wolf, Sebastian Reichel,
Andrew Morton, Jonathan Cameron, Tony Luck, Borislav Petkov,
Hanjun Guo, Mauro Carvalho Chehab, Shuai Xue, Len Brown,
Maciej Wieczor-Retman, Pawel Chmielewski, Dave Jiang,
Fabio M. De Francesco, Breno Leitao, Terry Bowman, linux-acpi,
linux-kernel, acpica-devel, Andy Shevchenko, Kai-Heng Feng
On Fri, Nov 13, 2026 at 12:42 PM Eliav Farber <farbere@amazon.com> wrote:
>
> Remove ghes_register_vendor_record_notifier() and
> ghes_unregister_vendor_record_notifier() along with their
> EXPORT_SYMBOL_GPL()s and ghes.h declarations, since there are no
> remaining in-tree callers - all users go through
> devm_ghes_register_vendor_record_notifier() instead.
>
> Inline the register/unregister calls directly into
> devm_ghes_register_vendor_record_notifier() and its destroy callback.
I'm just wondering, if you use --histogram diff algo when preparing
patches. I think it might look better for reading with that being
provided.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v6 4/7] ACPI: APEI: GHES: use devm_blocking_notifier_chain_register()
2026-11-13 10:42 [PATCH v6 0/7] notifier: convert remaining drivers to device-managed registration Eliav Farber
` (2 preceding siblings ...)
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 10:42 ` 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
5 siblings, 0 replies; 8+ messages in thread
From: Eliav Farber @ 2026-11-13 10:42 UTC (permalink / raw)
To: Rafael J. Wysocki, Dmitry Torokhov, Laurent Pinchart,
Hans de Goede, Ilpo Järvinen, Armin Wolf, Sebastian Reichel,
Andrew Morton
Cc: Eliav Farber, Jonathan Cameron, Tony Luck, Borislav Petkov,
Hanjun Guo, Mauro Carvalho Chehab, Shuai Xue, Len Brown,
Dave Jiang, Fabio M. De Francesco, Breno Leitao, Terry Bowman,
linux-acpi, linux-kernel, Andy Shevchenko, Kai-Heng Feng
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@amazon.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
---
Changes in v6:
- Rebased onto v7.4-rc1. No functional change since v4.
- Jonathan Cameron's Reviewed-by retained; the code is unchanged since
v4, when it was given.
Changes in v4:
- Split removal of unused code into a separate preceding patch
(Andy Shevchenko)
drivers/acpi/apei/ghes.c | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index a81ffacb16d0..92184ced12b8 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -679,23 +679,12 @@ static void ghes_handle_aer(struct acpi_hest_generic_data *gdata)
static BLOCKING_NOTIFIER_HEAD(vendor_record_notify_list);
-static void ghes_vendor_record_notifier_destroy(void *data)
-{
- struct notifier_block *nb = data;
-
- blocking_notifier_chain_unregister(&vendor_record_notify_list, nb);
-}
-
int devm_ghes_register_vendor_record_notifier(struct device *dev,
struct notifier_block *nb)
{
- int ret;
-
- ret = blocking_notifier_chain_register(&vendor_record_notify_list, 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
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v6 0/7] notifier: convert remaining drivers to device-managed registration
2026-11-13 10:42 [PATCH v6 0/7] notifier: convert remaining drivers to device-managed registration Eliav Farber
` (3 preceding siblings ...)
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 ` Eliav Farber
2026-11-13 11:46 ` Ilpo Järvinen
5 siblings, 0 replies; 8+ messages in thread
From: Eliav Farber @ 2026-11-13 11:03 UTC (permalink / raw)
To: Rafael J. Wysocki, Dmitry Torokhov, Laurent Pinchart,
Hans de Goede, Ilpo Järvinen, Armin Wolf, Sebastian Reichel,
Andrew Morton
Cc: linux-acpi, acpica-devel, linux-input, linux-gpio, linux-pwm,
platform-driver-x86, linux-pm, linux-kernel, Eliav Farber
Patches 5/7, 6/7 and 7/7 are not in this thread. My mail server refused the
second half of the series with a submission rate limit, and the resend went
out as a separate thread:
5/7 https://lore.kernel.org/all/20261113104459.35839-1-farbere@amazon.com/
6/7 https://lore.kernel.org/all/20261113104459.35839-2-farbere@amazon.com/
7/7 https://lore.kernel.org/all/20261113104459.35839-3-farbere@amazon.com/
All seven patches were delivered, so I am not resending them. Sorry for the
split thread.
--
Thanks, Eliav
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH v6 0/7] notifier: convert remaining drivers to device-managed registration
2026-11-13 10:42 [PATCH v6 0/7] notifier: convert remaining drivers to device-managed registration Eliav Farber
` (4 preceding siblings ...)
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
5 siblings, 0 replies; 8+ messages in thread
From: Ilpo Järvinen @ 2026-11-13 11:46 UTC (permalink / raw)
To: Rafael J. Wysocki, Dmitry Torokhov, Laurent Pinchart,
Hans de Goede, Armin Wolf, Sebastian Reichel, Andrew Morton,
Eliav Farber
Cc: linux-acpi, acpica-devel, linux-input, linux-gpio, linux-pwm,
platform-driver-x86, linux-pm, linux-kernel, Jonathan Cameron,
Andy Shevchenko, Uwe Kleine-König
On Fri, 13 Nov 2026 10:42:02 +0000, Eliav Farber wrote:
> The devm_atomic_notifier_chain_register() and
> devm_blocking_notifier_chain_register() helpers this series added in v5
> are now in mainline, together with 6 of the 11 driver conversions. This
> revision carries the 6 conversions that were never picked up, plus one
> new conversion for a driver that grew the old pattern after v5 was
> posted.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.
The list of commits applied:
[1/7] platform/x86: bitland-mifs-wmi: use devm_blocking_notifier_chain_register()
commit: a362539b42193dcdb17f8fba40031a515c53885c
[2/7] Input: adp5585: use devm_blocking_notifier_chain_register()
(no commit info)
[3/7] ACPI: APEI: GHES: remove unused ghes_{,un}register_vendor_record_notifier()
(no commit info)
[4/7] ACPI: APEI: GHES: use devm_blocking_notifier_chain_register()
(no commit info)
--
i.
^ permalink raw reply [flat|nested] 8+ messages in thread