[PATCH 10/11] staging: comedi: jr3_pci: fix initial range[8] max value

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



`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@xxxxxxxxx>
---
 drivers/staging/comedi/drivers/jr3_pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c
index a21344e1a4c3..e750be39103b 100644
--- a/drivers/staging/comedi/drivers/jr3_pci.c
+++ b/drivers/staging/comedi/drivers/jr3_pci.c
@@ -653,7 +653,7 @@ jr3_pci_alloc_spriv(struct comedi_device *dev, struct comedi_subdevice *s)
 	}
 	spriv->range[8].l.length = 1;
 	spriv->range[8].l.range[0].min = 0;
-	spriv->range[8].l.range[0].max = 65536;
+	spriv->range[8].l.range[0].max = 65535;
 
 	spriv->range_table_list[56] = &spriv->range[8].l;
 	spriv->range_table_list[57] = &spriv->range[8].l;
-- 
2.11.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux