android_kernel_google_msm/drivers
Ian Abbott 9712612a91 staging: comedi: ni_65xx: (bug fix) confine insn_bits to one subdevice
commit 677a315656 upstream.

The `insn_bits` handler `ni_65xx_dio_insn_bits()` has a `for` loop that
currently writes (optionally) and reads back up to 5 "ports" consisting
of 8 channels each.  It reads up to 32 1-bit channels but can only read
and write a whole port at once - it needs to handle up to 5 ports as the
first channel it reads might not be aligned on a port boundary.  It
breaks out of the loop early if the next port it handles is beyond the
final port on the card.  It also breaks out early on the 5th port in the
loop if the first channel was aligned.  Unfortunately, it doesn't check
that the current port it is dealing with belongs to the comedi subdevice
the `insn_bits` handler is acting on.  That's a bug.

Redo the `for` loop to terminate after the final port belonging to the
subdevice, changing the loop variable in the process to simplify things
a bit.  The `for` loop could now try and handle more than 5 ports if the
subdevice has more than 40 channels, but the test `if (bitshift >= 32)`
ensures it will break out early after 4 or 5 ports (depending on whether
the first channel is aligned on a port boundary).  (`bitshift` will be
between -7 and 7 inclusive on the first iteration, increasing by 8 for
each subsequent operation.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-13 15:42:49 -07:00
..
accessibility
acpi ACPI / EC: Add ASUSTEK L4R to quirk list in order to validate ECDT 2013-09-07 21:58:15 -07:00
amba
ata libata: apply behavioral quirks to sil3826 PMP 2013-08-29 09:50:13 -07:00
atm atm/iphase: rename fregt_t -> ffreg_t 2013-02-14 10:49:05 -08:00
auxdisplay
base drivers/base/memory.c: fix show_mem_removable() to handle missing sections 2013-09-07 21:58:14 -07:00
bcma
block cciss: fix info leak in cciss_ioctl32_passthru() 2013-10-13 15:42:47 -07:00
bluetooth Bluetooth: Add support for Dell[QCA 0cf3:817a] 2013-04-05 10:04:15 -07:00
cdrom drivers/cdrom/cdrom.c: use kzalloc() for failing hardware 2013-07-13 11:03:40 -07:00
char virtio: console: return -ENODEV on all read operations after unplug 2013-08-14 22:57:07 -07:00
clk clk: remove notifier from list before freeing it 2013-06-27 11:27:30 -07:00
clocksource
connector
cpufreq cpufreq / Longhaul: Disable driver by default 2013-05-11 13:48:10 -07:00
cpuidle
crypto
dca dca: check against empty dca_domains list before unregister provider 2013-02-28 06:59:06 -08:00
devfreq
dio
dma dmaengine: imx-dma: fix slow path issue in prep_dma_cyclic 2013-10-13 15:42:49 -07:00
edac
eisa EISA/PCI: Fix bus res reference 2013-04-12 09:38:44 -07:00
firewire firewire: fix libdc1394/FlyCap2 iso event regression 2013-08-04 16:26:02 +08:00
firmware efivars: Handle duplicate names from get_next_variable() 2013-04-05 10:04:36 -07:00
gpio
gpu drm/radeon: disable tests/benchmarks if accel is disabled 2013-10-05 07:06:54 -07:00
hid HID: LG: validate HID output report details 2013-10-05 07:06:54 -07:00
hsi
hv
hwmon hwmon: (applesmc) Check key count before proceeding 2013-10-05 07:06:54 -07:00
hwspinlock hwspinlock: fix __hwspin_lock_request error path 2013-04-12 09:38:46 -07:00
i2c i2c: designware: always clear interrupts before enabling them 2013-05-24 11:14:22 -07:00
ide
idle
ieee802154
infiniband ib_srpt: always set response for task management 2013-10-13 15:42:49 -07:00
input Input: cyttsp - fix memcpy size param 2013-06-27 11:27:33 -07:00
iommu intel-iommu: Fix leaks in pagetable freeing 2013-09-26 17:15:50 -07:00
isdn
leds drivers/leds/leds-ot200.c: fix error caused by shifted mask 2013-06-07 12:49:13 -07:00
lguest
macintosh
mca
md dm-snapshot: fix performance degradation due to small hash size 2013-10-05 07:06:54 -07:00
media media: mantis: fix silly crash case 2013-05-24 11:14:23 -07:00
memstick
message
mfd mfd: adp5520: Restore mode bits on resume 2013-05-07 19:51:57 -07:00
misc
mmc mmc: tmio_mmc_dma: fix PIO fallback on SDHI 2013-09-26 17:15:51 -07:00
mtd vm: convert mtdchar mmap to vm_iomap_memory() helper 2013-04-25 21:19:56 -07:00
net p54usb: add USB ID for Corega WLUSB2GTST USB adapter 2013-10-13 15:42:49 -07:00
nfc
nubus
of of: Fix missing memory initialization on FDT unflattening 2013-09-26 17:15:51 -07:00
oprofile
parisc
parport
pci ahci: Add AMD CZ SATA device ID 2013-07-21 18:19:01 -07:00
pcmcia pcmcia: at91_cf: fix gpio_get_value in at91_cf_get_status 2013-07-21 18:19:01 -07:00
pinctrl
platform thinkpad-acpi: recognize latest V-Series using DMI_BIOS_VENDOR 2013-06-07 12:49:49 -07:00
pnp
power charger-manager: Ensure event is not used as format string 2013-07-13 11:03:40 -07:00
pps
ps3
ptp
rapidio
regulator
remoteproc
rpmsg
rtc drivers/rtc/rtc-rv3029c2.c: fix disabling AIE irq 2013-07-21 18:19:01 -07:00
s390 SCSI: zfcp: fix schedule-inside-lock in scsi_device list loops 2013-08-29 09:50:13 -07:00
sbus
scsi esp_scsi: Fix tag state corruption when autosensing. 2013-10-13 15:42:49 -07:00
sfi
sh
sn
spi spi/mpc512x-psc: optionally keep PSC SS asserted across xfer segmensts 2013-04-12 09:38:43 -07:00
ssb ssb: implement spurious tone avoidance 2013-04-25 21:19:55 -07:00
staging staging: comedi: ni_65xx: (bug fix) confine insn_bits to one subdevice 2013-10-13 15:42:49 -07:00
target target: Fix trailing ASCII space usage in INQUIRY vendor+model 2013-09-07 21:58:16 -07:00
tc
thermal thermal: return an error on failure to register thermal class 2013-04-12 09:38:47 -07:00
tty powerpc/hvsi: Increase handshake timeout from 200ms to 400ms. 2013-09-07 21:58:14 -07:00
uio
usb USB: serial: option: Ignore card reader interface on Huawei E1750 2013-10-13 15:42:49 -07:00
uwb
vhost vhost: zerocopy: poll vq in zerocopy callback 2013-09-14 06:02:10 -07:00
video fbcon: when font is freed, clear also vc_font.data 2013-05-07 19:51:53 -07:00
virt
virtio virtio: support unlocked queue poll 2013-08-04 16:26:03 +08:00
vlynq
w1 w1: fix oops when w1_search is called from netlink connector 2013-03-20 13:04:59 -07:00
watchdog
xen xen-gnt: prevent adding duplicate gnt callbacks 2013-09-26 17:15:30 -07:00
zorro
Kconfig
Makefile