From: Valentine Barshak Date: Mon, 6 Dec 2010 15:16:11 +0000 (+0300) Subject: HID: Consolidate device existence checks in hiddev_ioctl X-Git-Tag: v2.6.38-rc1~442^2~19 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=33d6eb570b1f3fe5ba93cef465c5be66535c2c9a;p=pandora-kernel.git HID: Consolidate device existence checks in hiddev_ioctl Currently, if the device has been removed before hiddev_ioctl(), the -EIO is returned. If it's removed while hiddev_ioctl() is in progress, some commands are still processed fine, others return -ENODEV. This change takes the "existancelock" before processing ioctl commands and releases it at the end. If the device has been removed, always returns -ENODEV. Signed-off-by: Valentine Barshak Signed-off-by: Jiri Kosina --- Reading git-diff-tree failed