Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH 05/12] gpio: adp5585: use devm_blocking_notifier_chain_register()
@ 2026-07-23 17:55 Eliav Farber
  2026-07-23 17:55 ` [PATCH 06/12] platform/x86: bitland-mifs-wmi: " Eliav Farber
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Eliav Farber @ 2026-07-23 17:55 UTC (permalink / raw)
  To: rafael, tony.luck, bp, guohanjun, mchehab, xueshuai, lenb,
	laurent.pinchart, linusw, brgl, orsonzhai, baolin.wang,
	zhang.lyra, jic23, dlechner, nuno.sa, andy, dmitry.torokhov,
	hansg, ilpo.jarvinen, W_Armin, ukleinek, fabio.m.de.francesco,
	kaihengf, ankita, leitao, farbere, jason, pedro.pbg, paulmck,
	frederic, kees, linux-acpi, linux-kernel, linux-gpio, linux-pwm,
	linux-iio, linux-input, platform-driver-x86

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_gpio_unreg_notifier() callback.

Signed-off-by: Eliav Farber <farbere@amazon.com>
---
 drivers/gpio/gpio-adp5585.c | 20 +++-----------------
 1 file changed, 3 insertions(+), 17 deletions(-)

diff --git a/drivers/gpio/gpio-adp5585.c b/drivers/gpio/gpio-adp5585.c
index 6f10fc646008..7c04a7e86c8f 100644
--- a/drivers/gpio/gpio-adp5585.c
+++ b/drivers/gpio/gpio-adp5585.c
@@ -390,16 +390,6 @@ static const struct irq_chip adp5585_irq_chip = {
 	GPIOCHIP_IRQ_RESOURCE_HELPERS,
 };
 
-static void adp5585_gpio_unreg_notifier(void *data)
-{
-	struct adp5585_gpio_dev *adp5585_gpio = data;
-	struct device *dev = adp5585_gpio->gpio_chip.parent;
-	struct adp5585_dev *adp5585 = dev_get_drvdata(dev->parent);
-
-	blocking_notifier_chain_unregister(&adp5585->event_notifier,
-					   &adp5585_gpio->nb);
-}
-
 static int adp5585_gpio_probe(struct platform_device *pdev)
 {
 	struct adp5585_dev *adp5585 = dev_get_drvdata(pdev->dev.parent);
@@ -450,13 +440,9 @@ static int adp5585_gpio_probe(struct platform_device *pdev)
 		girq->threaded = true;
 
 		adp5585_gpio->nb.notifier_call = adp5585_gpio_key_event;
-		ret = blocking_notifier_chain_register(&adp5585->event_notifier,
-						       &adp5585_gpio->nb);
-		if (ret)
-			return ret;
-
-		ret = devm_add_action_or_reset(dev, adp5585_gpio_unreg_notifier,
-					       adp5585_gpio);
+		ret = devm_blocking_notifier_chain_register(dev,
+							    &adp5585->event_notifier,
+							    &adp5585_gpio->nb);
 		if (ret)
 			return ret;
 	}
-- 
2.47.3


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-07-23 17:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 17:55 [PATCH 05/12] gpio: adp5585: use devm_blocking_notifier_chain_register() Eliav Farber
2026-07-23 17:55 ` [PATCH 06/12] platform/x86: bitland-mifs-wmi: " Eliav Farber
2026-07-23 17:55 ` [PATCH 07/12] Input: adp5585: " Eliav Farber
2026-07-23 17:55 ` [PATCH 08/12] ACPI: APEI: GHES: " Eliav Farber
2026-07-23 17:55 ` [PATCH 09/12] platform/x86: uniwill-wmi: " Eliav Farber

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox