summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorDouglas Anderson <dianders@chromium.org>2021-07-20 09:07:49 -0700
committerJiri Kosina <jkosina@suse.cz>2021-07-28 11:48:49 +0200
commit25ddd7cfc582d6001c3b9e18e96c9b3a58523d66 (patch)
tree56fd96dd62b6eb4543b20a10ae62db0d1c1c6e9b /drivers/hid
parent18eeef46d3593e3bc3d6a8f7a6f94ace356578ff (diff)
downloadlinux-25ddd7cfc582d6001c3b9e18e96c9b3a58523d66.tar.gz
linux-25ddd7cfc582d6001c3b9e18e96c9b3a58523d66.tar.xz
HID: i2c-hid: goodix: Use the devm variant of regulator_register_notifier()
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 <dianders@chromium.org> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/i2c-hid/i2c-hid-of-goodix.c2
1 files changed, 1 insertions, 1 deletions
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,
*/
mutex_lock(&ihid_goodix->regulator_mutex);
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) {
mutex_unlock(&ihid_goodix->regulator_mutex);
return dev_err_probe(&client->dev, ret,