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:Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Jiri Kosina <jkosina@suse.com>
Loading
Please sign in to comment