]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf47d053567c56733cff0acf2dcb0a4d501595961
treed6639d183446fdc3a57be12e8cec196ef91e5329
parent61454a2a867d054978b0c96593e4554195a17554
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