staging:iio: core. Allow for event chrdev obtaining ioctl if no buffer present.
authorJonathan Cameron <jic23@cam.ac.uk>
Wed, 26 Oct 2011 16:27:45 +0000 (17:27 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 27 Nov 2011 00:30:31 +0000 (16:30 -0800)
commit96e00f110fae862b61f3db9dc25fe8f0f43f77e9
treed6639d183446fdc3a57be12e8cec196ef91e5329
parentbc9f35db8fed28d8fa1195b3927c8e1e91d64388
staging:iio: core. Allow for event chrdev obtaining ioctl if no buffer present.

Logic bug meant the chrdev would fail to open if there was no buffer support
in a driver or in the core. This meant the ioctl to get the event chrdev
would fail and hence events were not available.

V2: change error to -EINVAL to mark as unsuitable for reading rather than
not there.  Both are true depending on how you look at it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/iio_core.h
drivers/staging/iio/industrialio-buffer.c