From: Lars-Peter Clausen Date: Mon, 19 Dec 2011 14:23:45 +0000 (+0100) Subject: staging:iio: Make sure a device is only opened once at a time X-Git-Tag: v3.3-rc1~152^2~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb01443e2cdad4ff5b98e00252e93110d00f4392;p=pandora-kernel.git staging:iio: Make sure a device is only opened once at a time Our buffer implementation does not support multiple concurrent readers. So we have to ensure that a device is only opened once at a time. So do the same thing we do for the event fd and introduce a per device busy flag. The flag gets set when opening the device and gets cleared when closing the device. If a open is attempted while the busy flag is set we return -EBUSY. Acked-by: Jonathan Cameron Signed-off-by: Lars-Peter Clausen Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed