Commit 837b05fe authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Jiri Kosina
Browse files

HID: cp2112: hold the lock for the entire direction_output() call



We currently take the lock, set direction to output, release it,
reacquire it and set the desired value. That doesn't look correct.
Introduce a helper function that sets the value without taking the lock
and use it where applicable in order to combine the critical sections.

Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.com>
parent a99548b8
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment