HID: i2c-hid: add mutex protecting open/close race
We should not enter close function while someone else is in open. This mutex prevents this race. There is also no need to override the ret value with -EIO in case of a failure of i2c_hid_set_power. Signed-off-by: NBenjamin Tissoires <benjamin.tissoires@gmail.com> Reviewed-by: NJean Delvare <khali@linux-fr.org> Signed-off-by: NJiri Kosina <jkosina@suse.cz>
Showing
想要评论请 注册 或 登录