]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: jr3_pci: fix initial range[8] max value
authorIan Abbott <abbotti@mev.co.uk>
Wed, 8 Mar 2017 18:44:32 +0000 (18:44 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Mar 2017 13:57:00 +0000 (14:57 +0100)
commitf3900ce401dba0296949054c1d70de77ad939434
tree8444ebd7f2da87aa7db516dc0d00c2ba534b4d41
parent55cf98d2354fadcda7c1d7a6a297d3faac4ae569
staging: comedi: jr3_pci: fix initial range[8] max value

`jr3_pci_alloc_spriv()` initializes `spriv->range[8]` to use a maximum
value of 65536, but that will be overwritten with 65535 at a later time
by `jr3_pci_poll_subdevice()` once the "set full scales" command is
complete.  The initial setting looks like a mistake.  This range is only
associated with a couple of dummy channels (channels 56 and 57) to read
back the model number and serial number, so no user code should be
attempting to convert those numbers to physical units.  Just change the
initial value to 65535 to match the final value.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/jr3_pci.c