From 2d674084268bdc4c373d0e64c1382bd266a42afa Mon Sep 17 00:00:00 2001 From: David Schleef Date: Thu, 11 Jan 2001 21:50:56 +0000 Subject: [PATCH] added read_subdev and write_subdev where appropriate --- comedi/drivers/adl_pci9118.c | 4 +++- comedi/drivers/das16-new.c | 1 + comedi/drivers/das1800.c | 1 + comedi/drivers/das800.c | 1 + comedi/drivers/dt2814.c | 1 + comedi/drivers/dt282x.c | 2 ++ comedi/drivers/ni_atmio16d.c | 1 + comedi/drivers/ni_mio_common.c | 2 ++ comedi/drivers/skel.c | 1 + 9 files changed, 13 insertions(+), 1 deletion(-) diff --git a/comedi/drivers/adl_pci9118.c b/comedi/drivers/adl_pci9118.c index 78a361e3..e4a73807 100644 --- a/comedi/drivers/adl_pci9118.c +++ b/comedi/drivers/adl_pci9118.c @@ -1357,6 +1357,7 @@ static int pci9118_attach(comedi_device *dev,comedi_devconfig *it) if((ret=alloc_subdevices(dev))<0) return ret; + dev->read_subdev = 0; s = dev->subdevices + 0; s->type = COMEDI_SUBD_AI; s->subdev_flags = SDF_READABLE|SDF_RT|SDF_COMMON|SDF_GROUND|SDF_DIFF; @@ -1505,4 +1506,5 @@ void cleanup_module(void) * 0=use SSHO (pin 45) signal with onboard hardware S&H logic * 1=use ADCHN7 (pin 23) signal and use software for timing * (in this case external multiplexor can serve only 128 A/D channels) -*/ \ No newline at end of file +*/ + diff --git a/comedi/drivers/das16-new.c b/comedi/drivers/das16-new.c index 9e09b72b..fb1a9c01 100644 --- a/comedi/drivers/das16-new.c +++ b/comedi/drivers/das16-new.c @@ -1054,6 +1054,7 @@ static int das16_attach(comedi_device *dev, comedi_devconfig *it) printk(" ( no irq )\n"); } + dev->read_subdev=0; s=dev->subdevices+0; /* ai */ if(thisboard->ai){ diff --git a/comedi/drivers/das1800.c b/comedi/drivers/das1800.c index 150a9212..852e98fe 100644 --- a/comedi/drivers/das1800.c +++ b/comedi/drivers/das1800.c @@ -651,6 +651,7 @@ static int das1800_attach(comedi_device *dev, comedi_devconfig *it) if(alloc_subdevices(dev) < 0) return -ENOMEM; + dev->read_subdev = 0; /* analog input subdevice */ s = dev->subdevices + 0; s->type = COMEDI_SUBD_AI; diff --git a/comedi/drivers/das800.c b/comedi/drivers/das800.c index 6ff5bcc9..0b4222d2 100644 --- a/comedi/drivers/das800.c +++ b/comedi/drivers/das800.c @@ -342,6 +342,7 @@ static int das800_attach(comedi_device *dev, comedi_devconfig *it) if(alloc_subdevices(dev) < 0) return -ENOMEM; + dev->read_subdev = 0; /* analog input subdevice */ s = dev->subdevices + 0; s->type = COMEDI_SUBD_AI; diff --git a/comedi/drivers/dt2814.c b/comedi/drivers/dt2814.c index 0f92e630..88287026 100644 --- a/comedi/drivers/dt2814.c +++ b/comedi/drivers/dt2814.c @@ -318,6 +318,7 @@ static int dt2814_attach(comedi_device *dev,comedi_devconfig *it) if((ret=alloc_private(dev,sizeof(dt2814_private)))<0) return ret; + dev->read_subdev = 0; s=dev->subdevices+0; s->type=COMEDI_SUBD_AI; s->subdev_flags=SDF_READABLE; diff --git a/comedi/drivers/dt282x.c b/comedi/drivers/dt282x.c index bf747c20..96f227f2 100644 --- a/comedi/drivers/dt282x.c +++ b/comedi/drivers/dt282x.c @@ -1469,6 +1469,7 @@ static int dt282x_attach(comedi_device * dev, comedi_devconfig * it) s=dev->subdevices+0; + dev->read_subdev=0; /* ai subdevice */ s->type=COMEDI_SUBD_AI; s->subdev_flags=SDF_READABLE|((it->options[opt_diff])?SDF_DIFF:SDF_COMMON); @@ -1491,6 +1492,7 @@ static int dt282x_attach(comedi_device * dev, comedi_devconfig * it) s++; if((s->n_chan=boardtype.dachan)){ + dev->write_subdev=1; /* ao subsystem */ s->type=COMEDI_SUBD_AO; s->subdev_flags=SDF_WRITEABLE; diff --git a/comedi/drivers/ni_atmio16d.c b/comedi/drivers/ni_atmio16d.c index 43b87e88..5455cb9c 100644 --- a/comedi/drivers/ni_atmio16d.c +++ b/comedi/drivers/ni_atmio16d.c @@ -765,6 +765,7 @@ static int atmio16d_attach(comedi_device * dev, comedi_devconfig * it) devpriv->dac1_coding = it->options[12]; + dev->read_subdev = 0; /* setup sub-devices */ s=dev->subdevices+0; /* ai subdevice */ diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index fb923825..9cf29498 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -2003,6 +2003,7 @@ static int ni_E_init(comedi_device *dev,comedi_devconfig *it) /* analog input subdevice */ + dev->read_subdev=0; s=dev->subdevices+0; s->type=COMEDI_SUBD_AI; s->subdev_flags=SDF_READABLE|SDF_RT|SDF_GROUND|SDF_COMMON|SDF_DIFF|SDF_OTHER; @@ -2024,6 +2025,7 @@ static int ni_E_init(comedi_device *dev,comedi_devconfig *it) /* analog output subdevice */ /* XXX what about boards without ao? */ + dev->write_subdev=1; s=dev->subdevices+1; if(boardtype.n_aochan){ s->type=COMEDI_SUBD_AO; diff --git a/comedi/drivers/skel.c b/comedi/drivers/skel.c index 1d02a89a..b059011a 100644 --- a/comedi/drivers/skel.c +++ b/comedi/drivers/skel.c @@ -171,6 +171,7 @@ static int skel_attach(comedi_device *dev,comedi_devconfig *it) return -ENOMEM; s=dev->subdevices+0; + dev->read_subdev=0; /* analog input subdevice */ s->type=COMEDI_SUBD_AI; s->subdev_flags=SDF_READABLE; -- 2.26.2