提交 25ddd7cf 编写于 作者: D Douglas Anderson 提交者: Jiri Kosina

HID: i2c-hid: goodix: Use the devm variant of regulator_register_notifier()

In commit 18eeef46 ("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: 18eeef46 ("HID: i2c-hid: goodix: Tie the reset line to true state of the regulator")
Signed-off-by: NDouglas Anderson <dianders@chromium.org>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 18eeef46
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册