This member of the private data is initialized to 0 by pci1723_reset() and is not used any where else in the driver. Remove it. Use the register map defines to set the range for each output channel. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/drivers/adv_pci1723.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/adv_pci1723.c b/drivers/staging/comedi/drivers/adv_pci1723.c index 5134989..87f7836 100644 --- a/drivers/staging/comedi/drivers/adv_pci1723.c +++ b/drivers/staging/comedi/drivers/adv_pci1723.c @@ -86,7 +86,6 @@ TODO: #define PCI1723_VREF_POS10V (3 << 0) struct pci1723_private { - unsigned char da_range[8]; /* D/A output range for each channel */ unsigned short ao_data[8]; /* data output buffer */ }; @@ -105,8 +104,7 @@ static int pci1723_reset(struct comedi_device *dev) devpriv->ao_data[i] = 0x8000; outw(devpriv->ao_data[i], dev->iobase + PCI1723_AO_REG(i)); /* set all ranges to +/- 10V */ - devpriv->da_range[i] = 0; - outw(((devpriv->da_range[i] << 4) | i), + outw(PCI1723_CTRL_RANGE(0) | PCI1723_CTRL_CHAN(i), PCI1723_CTRL_REG); } -- 2.0.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel