From: Eliav Farber <farbere@amazon.com>
To: <rafael@kernel.org>, <tony.luck@intel.com>, <bp@alien8.de>,
<guohanjun@huawei.com>, <mchehab@kernel.org>,
<xueshuai@linux.alibaba.com>, <lenb@kernel.org>,
<laurent.pinchart@ideasonboard.com>, <linusw@kernel.org>,
<brgl@kernel.org>, <orsonzhai@gmail.com>,
<baolin.wang@linux.alibaba.com>, <zhang.lyra@gmail.com>,
<jic23@kernel.org>, <dlechner@baylibre.com>, <nuno.sa@analog.com>,
<andy@kernel.org>, <dmitry.torokhov@gmail.com>,
<hansg@kernel.org>, <ilpo.jarvinen@linux.intel.com>,
<W_Armin@gmx.de>, <ukleinek@kernel.org>,
<fabio.m.de.francesco@linux.intel.com>, <kaihengf@nvidia.com>,
<ankita@nvidia.com>, <leitao@debian.org>, <farbere@amazon.com>,
<pedro.pbg@usp.br>, <paulmck@kernel.org>, <frederic@kernel.org>,
<kees@kernel.org>, <saket.dumbre@intel.com>,
<linux-acpi@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-gpio@vger.kernel.org>, <linux-pwm@vger.kernel.org>,
<linux-iio@vger.kernel.org>, <linux-input@vger.kernel.org>,
<platform-driver-x86@vger.kernel.org>,
<acpica-devel@lists.linux.dev>
Cc: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Subject: [PATCH v5 05/13] gpio: adp5585: use devm_blocking_notifier_chain_register()
Date: Sun, 16 Aug 2026 06:06:04 +0000 [thread overview]
Message-ID: <20260816060648.4030-6-farbere@amazon.com> (raw)
In-Reply-To: <20260816060648.4030-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
adp5585_gpio_unreg_notifier() callback.
Signed-off-by: Eliav Farber <farbere@amazon.com>
Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.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
next prev parent reply other threads:[~2026-08-16 6:08 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-16 6:05 [PATCH v5 00/13] notifier: add device-managed registration APIs and convert drivers Eliav Farber
2026-08-16 6:06 ` [PATCH v5 01/13] notifier: add device-managed registration APIs Eliav Farber
2026-08-16 6:19 ` sashiko-bot
2026-08-16 7:00 ` Uwe Kleine-König
2026-08-16 7:04 ` Uwe Kleine-König
2026-08-16 6:06 ` [PATCH v5 02/13] pwm: iqs620a: use devm_blocking_notifier_chain_register() Eliav Farber
2026-08-16 6:06 ` [PATCH v5 03/13] iio: light: iqs621-als: " Eliav Farber
2026-08-16 6:06 ` [PATCH v5 04/13] iio: position: iqs624: " Eliav Farber
2026-08-16 6:06 ` Eliav Farber [this message]
2026-08-16 6:14 ` [PATCH v5 05/13] gpio: adp5585: " sashiko-bot
2026-08-16 6:06 ` [PATCH v5 06/13] platform/x86: bitland-mifs-wmi: " Eliav Farber
2026-08-16 6:06 ` [PATCH v5 07/13] Input: adp5585: " Eliav Farber
2026-08-16 6:14 ` sashiko-bot
2026-08-16 6:06 ` [PATCH v5 08/13] ACPI: APEI: GHES: remove unused ghes_{,un}register_vendor_record_notifier() Eliav Farber
2026-08-16 6:06 ` [PATCH v5 09/13] ACPI: APEI: GHES: use devm_blocking_notifier_chain_register() Eliav Farber
2026-08-16 6:06 ` [PATCH v5 10/13] platform/x86: uniwill-wmi: " Eliav Farber
2026-08-16 6:06 ` [PATCH v5 11/13] gpio: eic-sprd: use devm_atomic_notifier_chain_register() Eliav Farber
2026-08-16 6:06 ` [PATCH v5 12/13] gpio: gpiolib-kunit: use devm_blocking_notifier_chain_register() Eliav Farber
2026-08-16 6:06 ` [PATCH v5 13/13] reboot: " Eliav Farber
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=20260816060648.4030-6-farbere@amazon.com \
--to=farbere@amazon.com \
--cc=W_Armin@gmx.de \
--cc=acpica-devel@lists.linux.dev \
--cc=andy@kernel.org \
--cc=ankita@nvidia.com \
--cc=baolin.wang@linux.alibaba.com \
--cc=bartosz.golaszewski@oss.qualcomm.com \
--cc=bp@alien8.de \
--cc=brgl@kernel.org \
--cc=dlechner@baylibre.com \
--cc=dmitry.torokhov@gmail.com \
--cc=fabio.m.de.francesco@linux.intel.com \
--cc=frederic@kernel.org \
--cc=guohanjun@huawei.com \
--cc=hansg@kernel.org \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jic23@kernel.org \
--cc=kaihengf@nvidia.com \
--cc=kees@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=leitao@debian.org \
--cc=lenb@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=nuno.sa@analog.com \
--cc=orsonzhai@gmail.com \
--cc=paulmck@kernel.org \
--cc=pedro.pbg@usp.br \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=saket.dumbre@intel.com \
--cc=tony.luck@intel.com \
--cc=ukleinek@kernel.org \
--cc=xueshuai@linux.alibaba.com \
--cc=zhang.lyra@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.