]> 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)
commit3aaf05a8753cf43aa189ea86ef84fb11a8c29e73
treed6639d183446fdc3a57be12e8cec196ef91e5329
parentef40febe13a0224d2e221192cb7d94b604a2a05c
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