]> git.baikalelectronics.ru Git - kernel.git/commit
spi: spidev_test gives error upon 1-byte transfer
authorHector Palacios <hector.palacios@digi.com>
Thu, 29 Apr 2010 22:02:28 +0000 (15:02 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 29 Apr 2010 22:40:30 +0000 (16:40 -0600)
commite8bf418def53050bf21d30f569596b6d8ff36c04
tree774300dd52221307133f6bf9fd61c398bce8d0e1
parenta9f31c705aabd2faf32277fef06a3162eb0f97fc
spi: spidev_test gives error upon 1-byte transfer

The sample application spidev_test.c is using SPI_IOC_MESSAGE ioctl to do
an SPI transfer.  This ioctl returns the number of bytes successfully
transmitted or a negative error code upon erroneous completion.  The
application however is returning an error if the result of the ioclt if
the return value is 1.  This makes the application to fail upon 1-byte
length transfers.

Signed-off-by: Hector Palacios <hector.palacios@digi.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Documentation/spi/spidev_test.c