From 138409f17152e8d28e55a5c87b54bcb42217482d Mon Sep 17 00:00:00 2001 From: David Schleef Date: Fri, 8 Nov 2002 03:13:21 +0000 Subject: [PATCH] Change insn->data[] to data[], since insn->data points to user space --- comedi/drivers/8255.c | 2 +- comedi/drivers/adl_pci9111.c | 2 +- comedi/drivers/adl_pci9118.c | 2 +- comedi/drivers/cb_pcidas64.c | 2 +- comedi/drivers/das08.c | 8 ++++---- comedi/drivers/ni_at_ao.c | 2 +- comedi/drivers/ni_mio_common.c | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/comedi/drivers/8255.c b/comedi/drivers/8255.c index 9fbbec44..56703678 100644 --- a/comedi/drivers/8255.c +++ b/comedi/drivers/8255.c @@ -193,7 +193,7 @@ static int subdev_8255_insn_config(comedi_device *dev,comedi_subdevice *s, bits=0xf00000; } - switch(insn->data[0]){ + switch(data[0]){ case COMEDI_INPUT: s->io_bits&=~bits; break; diff --git a/comedi/drivers/adl_pci9111.c b/comedi/drivers/adl_pci9111.c index 21b16e6e..dffdde95 100644 --- a/comedi/drivers/adl_pci9111.c +++ b/comedi/drivers/adl_pci9111.c @@ -1065,7 +1065,7 @@ static int pci9111_ai_insn_read ( comedi_device *dev, } comedi_error(dev,"A/D read timeout"); - insn->data[i]=0; + data[i]=0; pci9111_fifo_reset(); return -ETIME; diff --git a/comedi/drivers/adl_pci9118.c b/comedi/drivers/adl_pci9118.c index 31be8001..e87ad89a 100644 --- a/comedi/drivers/adl_pci9118.c +++ b/comedi/drivers/adl_pci9118.c @@ -362,7 +362,7 @@ static int pci9118_insn_read_ai(comedi_device *dev,comedi_subdevice *s, comedi_i } comedi_error(dev,"A/D insn timeout"); - insn->data[n]=0; + data[n]=0; outl(0,dev->iobase+PCI9118_DELFIFO); // flush FIFO return -ETIME; diff --git a/comedi/drivers/cb_pcidas64.c b/comedi/drivers/cb_pcidas64.c index c0503fec..cf553019 100644 --- a/comedi/drivers/cb_pcidas64.c +++ b/comedi/drivers/cb_pcidas64.c @@ -2627,7 +2627,7 @@ static int dio_60xx_config_insn(comedi_device *dev, comedi_subdevice *s, comedi_ mask = 1 << CR_CHAN(insn->chanspec); - switch(insn->data[0]) + switch(data[0]) { case COMEDI_INPUT: s->io_bits &= ~mask; diff --git a/comedi/drivers/das08.c b/comedi/drivers/das08.c index 10ab31d4..13811ac8 100644 --- a/comedi/drivers/das08.c +++ b/comedi/drivers/das08.c @@ -661,8 +661,8 @@ static int das08jr_ao_winsn(comedi_device *dev,comedi_subdevice *s,comedi_insn * int lsb,msb; int chan; - lsb=insn->data[0]&0xff; - msb=(insn->data[0]>>8)&0xf; + lsb=data[0]&0xff; + msb=(data[0]>>8)&0xf; chan=CR_CHAN(insn->chanspec); @@ -694,8 +694,8 @@ static int das08ao_ao_winsn(comedi_device *dev,comedi_subdevice *s,comedi_insn * int lsb,msb; int chan; - lsb=insn->data[0]&0xff; - msb=(insn->data[0]>>8)&0xf; + lsb=data[0]&0xff; + msb=(data[0]>>8)&0xf; chan=CR_CHAN(insn->chanspec); diff --git a/comedi/drivers/ni_at_ao.c b/comedi/drivers/ni_at_ao.c index 8f7c021e..8e1f2f8d 100644 --- a/comedi/drivers/ni_at_ao.c +++ b/comedi/drivers/ni_at_ao.c @@ -416,7 +416,7 @@ static int atao_calib_insn_write(comedi_device *dev,comedi_subdevice *s, unsigned int bitstring, bit; unsigned int chan = CR_CHAN(insn->chanspec); - bitstring = ((chan&0x7)<<8)|(insn->data[insn->n-1]&0xff); + bitstring = ((chan&0x7)<<8)|(data[insn->n-1]&0xff); for(bit=1<<(11-1);bit;bit>>=1){ outw(devpriv->cfg2 | ((bit&bitstring)?SDATA:0), dev->iobase + ATAO_CFG2); diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index b657e9ec..8c8dc483 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -3090,7 +3090,7 @@ static int ni_pfi_insn_bits(comedi_device *dev,comedi_subdevice *s, { if(insn->n!=2)return -EINVAL; - insn->data[1] = 0; + data[1] = 0; return 2; } -- 2.26.2