linux-kernel-test/drivers
Sebastian Siewior 4b1295b0df 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>
2008-07-04 10:40:08 -07:00
..
accessibility
acorn/char
acpi rtc: fix CMOS time error after writing /proc/acpi/alarm 2008-07-04 10:40:05 -07:00
amba
ata sata_mv: safer logic for limit_warnings 2008-07-04 09:07:12 -04:00
atm atm: [he] send idle cells instead of unassigned when in SDH mode 2008-06-16 17:21:27 -07:00
auxdisplay Miguel Ojeda has moved 2008-07-04 10:40:05 -07:00
base dev_set_name: fix missing kernel-doc 2008-06-11 16:50:40 -07:00
block cciss: fix regression that no device nodes are created if no logical drives are configured. 2008-07-04 10:40:06 -07:00
bluetooth
cdrom
char tty: Fix inverted logic in send_break 2008-07-02 19:21:48 -07:00
clocksource
connector CONNECTOR: add a proc entry to list connectors 2008-06-27 20:03:24 -07:00
cpufreq Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/davej/cpufreq 2008-06-09 11:27:55 -07:00
cpuidle cpuidle acpi driver: fix oops on AC<->DC 2008-06-11 19:13:45 -04:00
crypto
dca
dio
dma
edac
eisa
firewire firewire: fw-sbp2: fix parsing of logical unit directories 2008-06-27 20:55:00 +02:00
firmware edd: fix incorrect return of 1 from module_init 2008-06-06 11:29:09 -07:00
gpio gpio: pca953x (i2c) handles max7310 too 2008-07-04 10:40:06 -07:00
hid
hwmon hdaps: add support for various newer Lenovo thinkpads 2008-07-04 10:40:06 -07:00
i2c I2C: S3C2410: Add MODULE_ALIAS() for s3c2440 device. 2008-07-01 14:30:38 +01:00
ide ide: fix /proc/ide/ide?/mate reporting 2008-06-30 20:14:45 +02:00
ieee1394 ieee1394: Kconfig menu touch-up 2008-06-19 00:12:36 +02:00
infiniband IB/mthca: Clear ICM pages before handing to FW 2008-06-23 09:29:58 -07:00
input drivers/input/ff-core.c needs <linux/sched.h> 2008-07-02 18:40:08 -07:00
isdn drivers/isdn/sc/ioctl.c: add missing kfree 2008-06-12 18:05:41 -07:00
leds
lguest x86: fix NULL pointer deref in __switch_to 2008-06-20 13:26:18 +02:00
macintosh [POWERPC] Build fix for drivers/macintosh/mediabay.c 2008-06-16 15:00:47 +10:00
mca
md Merge git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-2.6-dm 2008-07-02 18:55:17 -07:00
media V4L/DVB (8178): uvc: Fix compilation breakage for the other drivers, if uvc is selected 2008-07-02 08:58:15 -03:00
memstick
message
mfd
misc thinkpad-acpi: fix LED handling on older ThinkPads 2008-06-11 19:13:45 -04:00
mmc mmc: wbsd: initialize tasklets before requesting interrupt 2008-06-12 18:05:41 -07:00
mtd Merge git://git.infradead.org/~dwmw2/mtd-2.6.26 2008-06-06 11:31:18 -07:00
net hostap: fix sparse warnings 2008-06-30 15:43:52 -04:00
nubus
of rtc-ds1374: rename device to just "ds1374" 2008-06-06 11:29:10 -07:00
oprofile
parisc
parport
pci pci: VT3336 can't do MSI either 2008-07-04 10:40:05 -07:00
pcmcia
pnp PNPACPI: use _CRS IRQ descriptor length for _SRS 2008-06-11 19:13:46 -04:00
power power_supply: Fix race in power_supply_uevent 2008-06-10 02:13:51 +04:00
ps3
rapidio
rtc rtc-x1205: Fix alarm set 2008-07-04 10:40:05 -07:00
s390 Merge branch 'kvm-updates-2.6.26' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm 2008-06-11 10:35:44 -07:00
sbus
scsi [SCSI] esp: tidy up target reference counting 2008-06-25 12:36:13 -05:00
serial serial: fix serial_match_port() for dynamic major tty-device numbers 2008-07-04 10:40:04 -07:00
sh
sn
spi spi: fix the read path in spidev 2008-07-04 10:40:08 -07:00
ssb ssb: Fix coherent DMA mask for PCI devices 2008-06-13 16:14:52 -04:00
tc
telephony
thermal thermal: Create CONFIG_THERMAL_HWMON=n 2008-06-25 19:25:42 -04:00
uio
usb USB: adding comment for ipaq forcing number of ports 2008-07-03 18:20:38 -07:00
video w100fb: add 80 MHz modeline 2008-07-04 10:40:08 -07:00
virtio virtio: Complete feature negotation before updating status 2008-06-15 13:46:16 -07:00
w1
watchdog Revert "[WATCHDOG] hpwdt: Add CFLAGS to get driver working" 2008-06-24 13:09:26 +00:00
xen xen: Use wmb instead of rmb in xen_evtchn_do_upcall(). 2008-06-20 14:56:30 +02:00
zorro
Kconfig
Makefile