From: Benjamin Tissoires Date: Wed, 12 Dec 2012 17:00:02 +0000 (+0100) Subject: HID: i2c-hid: add mutex protecting open/close race X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~36^2^3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a7d6d9c5fcd4b674da38e814cfc0724c67731b2;p=pandora-kernel.git 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: Benjamin Tissoires Reviewed-by: Jean Delvare Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed