]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: dt9812: use CR_CHAN() for channel number
authorIan Abbott <abbotti@mev.co.uk>
Tue, 5 Mar 2013 13:13:44 +0000 (13:13 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Mar 2013 20:10:53 +0000 (13:10 -0700)
commit79ba4d02f6b7945dfb3a4a05850305b1d34f92bf
tree5e15a00e7f8789b7ae29ddc00ef699fb63ea87d3
parent6564af05b6f7e0e0519182153cfc408256803b53
staging: comedi: dt9812: use CR_CHAN() for channel number

commit 564c526a1bed5e42b5cd52cfe1752c4296ef17a6 upstream.

As pointed out by Dan Carpenper in
<http://driverdev.linuxdriverproject.org/pipermail/devel/2013-February/036025.html>,
the dt9812 comedi driver's use of the `chanspec` member of `struct
comedi_insn` as a channel number is incorrect.  Change it to use
`CR_CHAN(insn->chanspec)` as the channel number (where `insn` is a
pointer to the `struct comedi_insn` being processed).

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Anders Blomdell <anders.blomdell@control.lth.se>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/dt9812.c