summaryrefslogtreecommitdiffstats
path: root/include/asm-parisc/errno.h
diff options
context:
space:
mode:
authorSebastian Siewior2008-07-04 18:59:56 +0200
committerLinus Torvalds2008-07-04 19:40:08 +0200
commit4b1295b0df28cffd40e6c6d7c4b88dec7af1eb76 (patch)
treeea6414ba80a771c9ffdfd2c5e6c485c34ef671b4 /include/asm-parisc/errno.h
parentcgroups: document the effect of attaching PID 0 to a cgroup (diff)
downloadkernel-qcow2-linux-4b1295b0df28cffd40e6c6d7c4b88dec7af1eb76.tar.gz
kernel-qcow2-linux-4b1295b0df28cffd40e6c6d7c4b88dec7af1eb76.tar.xz
kernel-qcow2-linux-4b1295b0df28cffd40e6c6d7c4b88dec7af1eb76.zip
spi: fix the read path in spidev
This got broken by the recent "fix rmmod $spi_driver while spidev-user is active". I tested the rmmod & write path but didn't check the read path. I am sorry. The read logic changed and spidev_sync_read() + spidev_sync_write() do not return zero on success anymore but the number of bytes that has been transfered over the bus. This patch changes the logic and copy_to_user() gets called again. The write path returns the number of bytes which are written to the underlying device what may be less than the requested size. This patch makes the same change to the read path or else we request a read of 20 bytes, get 10, don't call copy to user and report to the user that we read 10 bytes. [akpm@linux-foundation.org: remove test of known-to-be-zero local] Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de> Acked-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-parisc/errno.h')
0 files changed, 0 insertions, 0 deletions