From bb01443e2cdad4ff5b98e00252e93110d00f4392 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 19 Dec 2011 15:23:45 +0100 Subject: [PATCH] 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-format-patch failed