All of
 help / color / mirror / Atom feed
From: Douglas Anderson <>
To: Jiri Kosina <>,
	Benjamin Tissoires <>
Cc: Douglas Anderson <>,,
Subject: [PATCH] HID: i2c-hid: goodix: Use the devm variant of regulator_register_notifier()
Date: Tue, 20 Jul 2021 09:07:49 -0700	[thread overview]
Message-ID: <20210720090736.1.Idc6db7d0f2c2ecc6e533e5b918a651a66f337b2f@changeid> (raw)

In commit 18eeef46d359 ("HID: i2c-hid: goodix: Tie the reset line to
true state of the regulator") I added a call to
regulator_register_notifier() but no call to unregister. That's a
bug. Let's use the devm variant to handle the unregistering.

Fixes: 18eeef46d359 ("HID: i2c-hid: goodix: Tie the reset line to true state of the regulator")
Signed-off-by: Douglas Anderson <>

 drivers/hid/i2c-hid/i2c-hid-of-goodix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/i2c-hid/i2c-hid-of-goodix.c b/drivers/hid/i2c-hid/i2c-hid-of-goodix.c
index 31a4c229fdb7..52674149a275 100644
--- a/drivers/hid/i2c-hid/i2c-hid-of-goodix.c
+++ b/drivers/hid/i2c-hid/i2c-hid-of-goodix.c
@@ -132,7 +132,7 @@ static int i2c_hid_of_goodix_probe(struct i2c_client *client,
 	ihid_goodix->nb.notifier_call = ihid_goodix_vdd_notify;
-	ret = regulator_register_notifier(ihid_goodix->vdd, &ihid_goodix->nb);
+	ret = devm_regulator_register_notifier(ihid_goodix->vdd, &ihid_goodix->nb);
 	if (ret) {
 		return dev_err_probe(&client->dev, ret,

             reply	other threads:[~2021-07-20 16:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20 16:07 Douglas Anderson [this message]
2021-07-28  9:49 ` Jiri Kosina

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210720090736.1.Idc6db7d0f2c2ecc6e533e5b918a651a66f337b2f@changeid \ \ \ \ \ \
    --subject='Re: [PATCH] HID: i2c-hid: goodix: Use the devm variant of regulator_register_notifier()' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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.