alistair23-linux/drivers
H Hartley Sweeten 2704f807f9 staging: comedi: usbdux: bug fix for accessing 'ao_chanlist' in private data
In usbdux_ao_cmd(), the channels for the command are transfered from the
cmd->chanlist and stored in the private data 'ao_chanlist'. The channel
numbers are bit-shifted when stored so that they become the "command"
that is transfered to the device. The channel to command conversion
results in the 'ao_chanlist' having these values for the channels:

  channel 0 -> ao_chanlist = 0x00
  channel 1 -> ao_chanlist = 0x40
  channel 2 -> ao_chanlist = 0x80
  channel 3 -> ao_chanlist = 0xc0

The problem is, the usbduxsub_ao_isoc_irq() function uses the 'chan' value
from 'ao_chanlist' to access the 'ao_readback' array in the private data.
So instead of accessing the array as 0, 1, 2, 3, it accesses it as 0x00,
0x40, 0x80, 0xc0.

Fix this by storing the raw channel number in 'ao_chanlist' and doing the
bit-shift when creating the command.

Fixes: a998a3db53 "staging: comedi: usbdux: cleanup the private data 'outBuffer'"
Cc: stable <stable@vger.kernel.org> # 3.12
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Acked-by: Bernd Porr <mail@berndporr.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-23 16:20:15 -07:00
..
accessibility
acpi Merge branch 'acpi-config' 2014-04-08 21:34:51 +02:00
amba ARM: SoC: driver changes 2014-04-05 15:37:40 -07:00
ata Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2014-04-02 16:23:38 -07:00
atm
auxdisplay
base drivers/base/dd.c incorrect pr_debug() parameters 2014-04-16 19:34:46 -07:00
bcma
block Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-04-12 14:49:50 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-04-02 20:53:45 -07:00
bus ARM: SoC: driver changes 2014-04-05 15:37:40 -07:00
cdrom
char TTY/Serial driver fixes for 3.15-rc2 2014-04-18 16:57:53 -07:00
clk == Changes to existing drivers == 2014-04-07 10:24:18 -07:00
clocksource CPU hotplug notifiers registration fixes for 3.15-rc1 2014-04-07 14:55:46 -07:00
connector Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-04-02 20:53:45 -07:00
cpufreq Merge branch 'pm-cpufreq' 2014-04-08 13:28:02 +02:00
cpuidle Merge branch 'pm-cpuidle' 2014-04-08 13:27:40 +02:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-04-03 09:28:16 -07:00
dca
devfreq
dio
dma dma: fix eDMA driver as a subsys_initcall 2014-04-16 12:03:47 +05:30
edac Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2014-04-04 09:50:07 -07:00
eisa
extcon
firewire
firmware Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2014-04-11 11:58:33 -07:00
fmc
gpio Shiraz has moved 2014-04-18 16:40:08 -07:00
gpu Merge branch 'drm-next-3.15-wip' of git://people.freedesktop.org/~deathsimple/linux into drm-next 2014-04-19 11:16:02 +10:00
hid Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid 2014-04-18 10:31:34 -07:00
hsi
hv Drivers: hv: vmbus: Negotiate version 3.0 when running on ws2012r2 hosts 2014-04-16 14:14:07 -07:00
hwmon Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2014-04-09 08:35:31 -07:00
hwspinlock
i2c Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2014-04-09 08:45:40 -07:00
ide
idle Merge branch 'pm-cpuidle' 2014-04-08 13:27:40 +02:00
iio First found of IIO fixes for the 3.15 cycle. 2014-04-22 21:29:20 -07:00
infiniband InfiniBand/RDMA updates for 3.15-rc2: 2014-04-18 13:49:42 -07:00
input pwm: Changes for v3.15-rc1 2014-04-05 18:32:31 -07:00
iommu Merge git://git.infradead.org/iommu-2.6 into iommu/fixes 2014-04-16 16:09:40 +02:00
ipack
irqchip Shiraz has moved 2014-04-18 16:40:08 -07:00
isdn isdn: icn: buffer overflow in icn_command() 2014-04-16 15:24:15 -04:00
leds Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/cooloney/linux-leds 2014-04-10 09:06:10 -07:00
lguest drivers/lguest/page_tables.c: rename do_set_pte() 2014-04-07 16:35:52 -07:00
macintosh
mailbox
mcb drivers: mcb: fix memory leak in chameleon_parse_cells() error path 2014-04-16 12:28:47 -07:00
md One BUG fix for md for recent commit 2014-04-17 10:51:01 -07:00
media platform: Fix timberdale dependencies 2014-04-16 11:57:27 +05:30
memory
memstick
message PCI changes for the v3.15 merge window: 2014-04-01 15:14:04 -07:00
mfd MMC highlights for 3.15: 2014-04-09 08:39:39 -07:00
misc misc: Grammar s/addition/additional/ 2014-04-16 12:28:47 -07:00
mmc MMC highlights for 3.15: 2014-04-09 08:39:39 -07:00
mtd Shiraz has moved 2014-04-18 16:40:08 -07:00
net Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2014-04-18 18:29:44 -04:00
nfc
ntb ntb: Use pci_enable_msix_range() instead of pci_enable_msix() 2014-04-07 10:59:20 -07:00
nubus
of of: Clean up of_update_property 2014-04-15 15:21:22 -05:00
oprofile
parisc
parport
pci PCI: tegra: Use new OF interrupt mapping when possible 2014-04-16 10:24:32 -06:00
pcmcia PCI changes for the v3.15 merge window: 2014-04-01 15:14:04 -07:00
phy ARM: SoC: driver changes 2014-04-05 15:37:40 -07:00
pinctrl pinctrl: Rename Broadcom Capri pinctrl driver 2014-04-14 09:39:33 +02:00
platform alienware-wmi: cover some scenarios where memory allocations would fail 2014-04-10 12:11:56 -04:00
pnp More ACPI and power management updates for 3.15-rc1 2014-04-02 14:10:21 -07:00
power
powercap CPU hotplug notifiers registration fixes for 3.15-rc1 2014-04-07 14:55:46 -07:00
pps
ps3
ptp net: ptp: move PTP classifier in its own file 2014-04-01 16:43:18 -04:00
pwm Shiraz has moved 2014-04-18 16:40:08 -07:00
rapidio rapidio: rework device hierarchy and introduce mport class of devices 2014-04-07 16:36:07 -07:00
regulator regulator: Fixes for v3.15 2014-04-11 13:30:05 -07:00
remoteproc
reset
rpmsg
rtc ARM: SoC: driver changes 2014-04-05 15:37:40 -07:00
s390 s390/sclp_cmd: replace PTR_RET with PTR_ERR_OR_ZERO 2014-04-11 13:53:42 +02:00
sbus
scsi sym53c8xx_2: Set DID_REQUEUE return code when aborting squeue 2014-04-12 18:02:16 -07:00
sfi
sh ARM: SoC: sh driver changes 2014-04-05 15:38:41 -07:00
sn
spi spi: Fixes for v3.15 2014-04-11 13:35:49 -07:00
spmi
ssb
staging staging: comedi: usbdux: bug fix for accessing 'ao_chanlist' in private data 2014-04-23 16:20:15 -07:00
target Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-04-12 17:31:22 -07:00
tc
thermal Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux 2014-04-10 09:15:46 -07:00
tty Revert "serial: 8250, disable "too much work" messages" 2014-04-17 09:33:19 -07:00
uio
usb uas: fix deadlocky memory allocations 2014-04-16 14:04:59 -07:00
uwb uwb: adds missing error handling 2014-04-16 14:03:40 -07:00
vfio VFIO updates for v3.15 include: 2014-04-03 14:05:02 -07:00
vhost Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2014-04-12 16:51:08 -07:00
video video: Kconfig: move drm and fb into separate menus 2014-04-17 08:10:20 +03:00
virt
virtio
vlynq
vme vme_tsi148: Utilize to_pci_dev() macro 2014-04-16 14:08:37 -07:00
w1 w1: avoid recursive device_add 2014-04-16 14:07:51 -07:00
watchdog CPU hotplug notifiers registration fixes for 3.15-rc1 2014-04-07 14:55:46 -07:00
xen Xen regression and bug fixes for 3.15-rc1. 2014-04-17 10:54:07 -07:00
zorro
Kconfig
Makefile video: move fbdev to drivers/video/fbdev 2014-04-17 08:10:19 +03:00