Most of the comedi drivers that provide readback for write only subdevices now use the comedi core comedi_alloc_subdev_readback() helper to allocate the subdevice 'reaback' member instead of using some member in their private data. These drivers also hook up the (*insn_read) callback to the comedi_readback_insn_read() helper to provide the readback. Have the core automatically hook up the (*insn_read) callback after allocating the memory if the driver has not already hooked it up to a private function. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- v2: Only hook up the default (*insn_read) if the driver has not already hooked it to a private function (suggested by Ian Abbott). The rest of this series is unchanged. drivers/staging/comedi/drivers.c | 4 ++++ drivers/staging/comedi/drivers/addi_apci_3120.c | 1 - drivers/staging/comedi/drivers/addi_apci_3501.c | 1 - drivers/staging/comedi/drivers/addi_apci_3xxx.c | 1 - drivers/staging/comedi/drivers/adl_pci6208.c | 1 - drivers/staging/comedi/drivers/adl_pci9111.c | 1 - drivers/staging/comedi/drivers/adl_pci9118.c | 1 - drivers/staging/comedi/drivers/aio_aio12_8.c | 1 - drivers/staging/comedi/drivers/amplc_pci224.c | 1 - drivers/staging/comedi/drivers/amplc_pci230.c | 1 - drivers/staging/comedi/drivers/cb_das16_cs.c | 1 - drivers/staging/comedi/drivers/cb_pcidas.c | 1 - drivers/staging/comedi/drivers/cb_pcidas64.c | 1 - drivers/staging/comedi/drivers/cb_pcimdas.c | 1 - drivers/staging/comedi/drivers/dac02.c | 1 - drivers/staging/comedi/drivers/daqboard2000.c | 1 - drivers/staging/comedi/drivers/das08.c | 1 - drivers/staging/comedi/drivers/das16.c | 1 - drivers/staging/comedi/drivers/dmm32at.c | 1 - drivers/staging/comedi/drivers/dt2801.c | 1 - drivers/staging/comedi/drivers/dt2811.c | 1 - drivers/staging/comedi/drivers/dt282x.c | 1 - drivers/staging/comedi/drivers/dt3000.c | 1 - drivers/staging/comedi/drivers/fl512.c | 1 - drivers/staging/comedi/drivers/icp_multi.c | 1 - drivers/staging/comedi/drivers/ii_pci20kc.c | 1 - drivers/staging/comedi/drivers/me4000.c | 1 - drivers/staging/comedi/drivers/me_daq.c | 1 - drivers/staging/comedi/drivers/mf6x4.c | 1 - drivers/staging/comedi/drivers/multiq3.c | 1 - drivers/staging/comedi/drivers/ni_670x.c | 1 - drivers/staging/comedi/drivers/ni_at_ao.c | 1 - drivers/staging/comedi/drivers/ni_atmio16d.c | 1 - drivers/staging/comedi/drivers/ni_mio_common.c | 1 - drivers/staging/comedi/drivers/pcl711.c | 1 - drivers/staging/comedi/drivers/pcl726.c | 1 - drivers/staging/comedi/drivers/pcl812.c | 1 - drivers/staging/comedi/drivers/pcl818.c | 1 - drivers/staging/comedi/drivers/pcmmio.c | 1 - drivers/staging/comedi/drivers/quatech_daqp_cs.c | 1 - drivers/staging/comedi/drivers/rtd520.c | 1 - drivers/staging/comedi/drivers/rti800.c | 1 - drivers/staging/comedi/drivers/rti802.c | 1 - drivers/staging/comedi/drivers/s526.c | 1 - drivers/staging/comedi/drivers/s626.c | 1 - 45 files changed, 4 insertions(+), 44 deletions(-) diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c index e516ed9..61802d7 100644 --- a/drivers/staging/comedi/drivers.c +++ b/drivers/staging/comedi/drivers.c @@ -109,6 +109,10 @@ int comedi_alloc_subdev_readback(struct comedi_subdevice *s) s->readback = kcalloc(s->n_chan, sizeof(*s->readback), GFP_KERNEL); if (!s->readback) return -ENOMEM; + + if (!s->insn_read) + s->insn_read = comedi_readback_insn_read; + return 0; } EXPORT_SYMBOL_GPL(comedi_alloc_subdev_readback); diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c index e9816e7..c65f940 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3120.c +++ b/drivers/staging/comedi/drivers/addi_apci_3120.c @@ -1051,7 +1051,6 @@ static int apci3120_auto_attach(struct comedi_device *dev, s->maxdata = 0x3fff; s->range_table = &range_bipolar10; s->insn_write = apci3120_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c index 7924523..a726efc 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3501.c +++ b/drivers/staging/comedi/drivers/addi_apci_3501.c @@ -362,7 +362,6 @@ static int apci3501_auto_attach(struct comedi_device *dev, s->maxdata = 0x3fff; s->range_table = &apci3501_ao_range; s->insn_write = apci3501_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/addi_apci_3xxx.c b/drivers/staging/comedi/drivers/addi_apci_3xxx.c index 630d778..c173810 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3xxx.c +++ b/drivers/staging/comedi/drivers/addi_apci_3xxx.c @@ -854,7 +854,6 @@ static int apci3xxx_auto_attach(struct comedi_device *dev, s->maxdata = 0x0fff; s->range_table = &apci3xxx_ao_range; s->insn_write = apci3xxx_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/adl_pci6208.c b/drivers/staging/comedi/drivers/adl_pci6208.c index 0ad46fe..528f15c 100644 --- a/drivers/staging/comedi/drivers/adl_pci6208.c +++ b/drivers/staging/comedi/drivers/adl_pci6208.c @@ -169,7 +169,6 @@ static int pci6208_auto_attach(struct comedi_device *dev, s->maxdata = 0xffff; s->range_table = &range_bipolar10; s->insn_write = pci6208_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c index 539eb94..47f6c0e 100644 --- a/drivers/staging/comedi/drivers/adl_pci9111.c +++ b/drivers/staging/comedi/drivers/adl_pci9111.c @@ -731,7 +731,6 @@ static int pci9111_auto_attach(struct comedi_device *dev, s->len_chanlist = 1; s->range_table = &range_bipolar10; s->insn_write = pci9111_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c index 498e0c7..5e0ff9d 100644 --- a/drivers/staging/comedi/drivers/adl_pci9118.c +++ b/drivers/staging/comedi/drivers/adl_pci9118.c @@ -1588,7 +1588,6 @@ static int pci9118_common_attach(struct comedi_device *dev, s->maxdata = 0x0fff; s->range_table = &range_bipolar10; s->insn_write = pci9118_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/aio_aio12_8.c b/drivers/staging/comedi/drivers/aio_aio12_8.c index 538277a..fbc3e5a 100644 --- a/drivers/staging/comedi/drivers/aio_aio12_8.c +++ b/drivers/staging/comedi/drivers/aio_aio12_8.c @@ -212,7 +212,6 @@ static int aio_aio12_8_attach(struct comedi_device *dev, s->maxdata = 0x0fff; s->range_table = &range_aio_aio12_8; s->insn_write = aio_aio12_8_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c index a896f01..924c829 100644 --- a/drivers/staging/comedi/drivers/amplc_pci224.c +++ b/drivers/staging/comedi/drivers/amplc_pci224.c @@ -1075,7 +1075,6 @@ pci224_auto_attach(struct comedi_device *dev, unsigned long context_model) s->maxdata = (1 << thisboard->ao_bits) - 1; s->range_table = thisboard->ao_range; s->insn_write = pci224_ao_insn_write; - s->insn_read = comedi_readback_insn_read; s->len_chanlist = s->n_chan; dev->write_subdev = s; s->do_cmd = pci224_ao_cmd; diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c index fb0b70f..49806a5 100644 --- a/drivers/staging/comedi/drivers/amplc_pci230.c +++ b/drivers/staging/comedi/drivers/amplc_pci230.c @@ -2511,7 +2511,6 @@ static int pci230_auto_attach(struct comedi_device *dev, s->maxdata = (1 << thisboard->ao_bits) - 1; s->range_table = &pci230_ao_range; s->insn_write = pci230_ao_insn_write; - s->insn_read = comedi_readback_insn_read; s->len_chanlist = 2; if (dev->irq) { dev->write_subdev = s; diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c index f88880a..0a48d2a 100644 --- a/drivers/staging/comedi/drivers/cb_das16_cs.c +++ b/drivers/staging/comedi/drivers/cb_das16_cs.c @@ -305,7 +305,6 @@ static int das16cs_auto_attach(struct comedi_device *dev, s->maxdata = 0xffff; s->range_table = &range_bipolar10; s->insn_write = &das16cs_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/cb_pcidas.c b/drivers/staging/comedi/drivers/cb_pcidas.c index 10c67fe..35c6305 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas.c +++ b/drivers/staging/comedi/drivers/cb_pcidas.c @@ -1478,7 +1478,6 @@ static int cb_pcidas_auto_attach(struct comedi_device *dev, s->range_table = &cb_pcidas_ao_ranges; /* default to no fifo (*insn_write) */ s->insn_write = cb_pcidas_ao_nofifo_winsn; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/cb_pcidas64.c b/drivers/staging/comedi/drivers/cb_pcidas64.c index 05da5b3..4762e6a 100644 --- a/drivers/staging/comedi/drivers/cb_pcidas64.c +++ b/drivers/staging/comedi/drivers/cb_pcidas64.c @@ -3786,7 +3786,6 @@ static int setup_subdevices(struct comedi_device *dev) s->maxdata = (1 << thisboard->ao_bits) - 1; s->range_table = thisboard->ao_range_table; s->insn_write = ao_winsn; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c index 73e5c96..70dd2c9 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdas.c +++ b/drivers/staging/comedi/drivers/cb_pcimdas.c @@ -226,7 +226,6 @@ static int cb_pcimdas_auto_attach(struct comedi_device *dev, /* ranges are hardware settable, but not software readable. */ s->range_table = &range_unknown; s->insn_write = cb_pcimdas_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/dac02.c b/drivers/staging/comedi/drivers/dac02.c index 34cbe83..beb36c8 100644 --- a/drivers/staging/comedi/drivers/dac02.c +++ b/drivers/staging/comedi/drivers/dac02.c @@ -129,7 +129,6 @@ static int dac02_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->maxdata = 0x0fff; s->range_table = &das02_ao_ranges; s->insn_write = dac02_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c index e5b5a81..96697fb 100644 --- a/drivers/staging/comedi/drivers/daqboard2000.c +++ b/drivers/staging/comedi/drivers/daqboard2000.c @@ -707,7 +707,6 @@ static int daqboard2000_auto_attach(struct comedi_device *dev, s->n_chan = 2; s->maxdata = 0xffff; s->insn_write = daqboard2000_ao_insn_write; - s->insn_read = comedi_readback_insn_read; s->range_table = &range_bipolar10; result = comedi_alloc_subdev_readback(s); diff --git a/drivers/staging/comedi/drivers/das08.c b/drivers/staging/comedi/drivers/das08.c index cdf71f9..20a9f0e 100644 --- a/drivers/staging/comedi/drivers/das08.c +++ b/drivers/staging/comedi/drivers/das08.c @@ -474,7 +474,6 @@ int das08_common_attach(struct comedi_device *dev, unsigned long iobase) s->maxdata = (1 << thisboard->ao_nbits) - 1; s->range_table = &range_bipolar5; s->insn_write = das08_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/das16.c b/drivers/staging/comedi/drivers/das16.c index 8de2705..2436057 100644 --- a/drivers/staging/comedi/drivers/das16.c +++ b/drivers/staging/comedi/drivers/das16.c @@ -1175,7 +1175,6 @@ static int das16_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->maxdata = 0x0fff; s->range_table = devpriv->user_ao_range_table; s->insn_write = das16_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comedi/drivers/dmm32at.c index 0973226..6df298a 100644 --- a/drivers/staging/comedi/drivers/dmm32at.c +++ b/drivers/staging/comedi/drivers/dmm32at.c @@ -601,7 +601,6 @@ static int dmm32at_attach(struct comedi_device *dev, s->maxdata = 0x0fff; s->range_table = &dmm32at_aoranges; s->insn_write = dmm32at_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/dt2801.c b/drivers/staging/comedi/drivers/dt2801.c index e973863..b96e60f 100644 --- a/drivers/staging/comedi/drivers/dt2801.c +++ b/drivers/staging/comedi/drivers/dt2801.c @@ -597,7 +597,6 @@ havetype: devpriv->dac_range_types[0] = dac_range_lkup(it->options[4]); devpriv->dac_range_types[1] = dac_range_lkup(it->options[5]); s->insn_write = dt2801_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/dt2811.c b/drivers/staging/comedi/drivers/dt2811.c index 1736e39..d660f27 100644 --- a/drivers/staging/comedi/drivers/dt2811.c +++ b/drivers/staging/comedi/drivers/dt2811.c @@ -418,7 +418,6 @@ static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it) devpriv->range_type_list[0] = dac_range_types[devpriv->dac_range[0]]; devpriv->range_type_list[1] = dac_range_types[devpriv->dac_range[1]]; s->insn_write = dt2811_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c index 674e03e..2be98bb 100644 --- a/drivers/staging/comedi/drivers/dt282x.c +++ b/drivers/staging/comedi/drivers/dt282x.c @@ -1231,7 +1231,6 @@ static int dt282x_attach(struct comedi_device *dev, struct comedi_devconfig *it) /* ranges are per-channel, set by jumpers on the board */ s->range_table = &dt282x_ao_range; s->insn_write = dt282x_ao_insn_write; - s->insn_read = comedi_readback_insn_read; if (dev->irq) { dev->write_subdev = s; s->subdev_flags |= SDF_CMD_WRITE; diff --git a/drivers/staging/comedi/drivers/dt3000.c b/drivers/staging/comedi/drivers/dt3000.c index c2058ba..1d9a7a6 100644 --- a/drivers/staging/comedi/drivers/dt3000.c +++ b/drivers/staging/comedi/drivers/dt3000.c @@ -697,7 +697,6 @@ static int dt3000_auto_attach(struct comedi_device *dev, s->len_chanlist = 1; s->range_table = &range_bipolar10; s->insn_write = dt3k_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/fl512.c b/drivers/staging/comedi/drivers/fl512.c index 5a1e3c8..e1f4932 100644 --- a/drivers/staging/comedi/drivers/fl512.c +++ b/drivers/staging/comedi/drivers/fl512.c @@ -135,7 +135,6 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->maxdata = 0x0fff; s->range_table = &range_fl512; s->insn_write = fl512_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/icp_multi.c b/drivers/staging/comedi/drivers/icp_multi.c index fbbcab2..1ea1686 100644 --- a/drivers/staging/comedi/drivers/icp_multi.c +++ b/drivers/staging/comedi/drivers/icp_multi.c @@ -495,7 +495,6 @@ static int icp_multi_auto_attach(struct comedi_device *dev, s->len_chanlist = 4; s->range_table = &range_analog; s->insn_write = icp_multi_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/ii_pci20kc.c b/drivers/staging/comedi/drivers/ii_pci20kc.c index cc5fd75..1085d66 100644 --- a/drivers/staging/comedi/drivers/ii_pci20kc.c +++ b/drivers/staging/comedi/drivers/ii_pci20kc.c @@ -392,7 +392,6 @@ static int ii20k_init_module(struct comedi_device *dev, s->maxdata = 0xffff; s->range_table = &ii20k_ao_ranges; s->insn_write = ii20k_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index ae6ac49..208b1c7 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -1426,7 +1426,6 @@ static int me4000_auto_attach(struct comedi_device *dev, s->maxdata = 0xFFFF; /* 16 bit DAC */ s->range_table = &range_bipolar10; s->insn_write = me4000_ao_insn_write; - s->insn_read = comedi_readback_insn_read; result = comedi_alloc_subdev_readback(s); if (result) diff --git a/drivers/staging/comedi/drivers/me_daq.c b/drivers/staging/comedi/drivers/me_daq.c index 9dec9c1..b5278c1 100644 --- a/drivers/staging/comedi/drivers/me_daq.c +++ b/drivers/staging/comedi/drivers/me_daq.c @@ -517,7 +517,6 @@ static int me_auto_attach(struct comedi_device *dev, s->len_chanlist = 4; s->range_table = &me_ao_range; s->insn_write = me_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/mf6x4.c b/drivers/staging/comedi/drivers/mf6x4.c index c8d3a22..af21bc1 100644 --- a/drivers/staging/comedi/drivers/mf6x4.c +++ b/drivers/staging/comedi/drivers/mf6x4.c @@ -259,7 +259,6 @@ static int mf6x4_auto_attach(struct comedi_device *dev, unsigned long context) s->maxdata = 0x3fff; /* 14 bits DAC */ s->range_table = &range_bipolar10; s->insn_write = mf6x4_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/multiq3.c b/drivers/staging/comedi/drivers/multiq3.c index f710c8e..8471219 100644 --- a/drivers/staging/comedi/drivers/multiq3.c +++ b/drivers/staging/comedi/drivers/multiq3.c @@ -238,7 +238,6 @@ static int multiq3_attach(struct comedi_device *dev, s->maxdata = 0xfff; s->range_table = &range_bipolar5; s->insn_write = multiq3_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/ni_670x.c b/drivers/staging/comedi/drivers/ni_670x.c index 54721de..c42a81c 100644 --- a/drivers/staging/comedi/drivers/ni_670x.c +++ b/drivers/staging/comedi/drivers/ni_670x.c @@ -228,7 +228,6 @@ static int ni_670x_auto_attach(struct comedi_device *dev, s->range_table = &range_bipolar10; } s->insn_write = ni_670x_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/ni_at_ao.c b/drivers/staging/comedi/drivers/ni_at_ao.c index 3e1ce58..5fb40cd 100644 --- a/drivers/staging/comedi/drivers/ni_at_ao.c +++ b/drivers/staging/comedi/drivers/ni_at_ao.c @@ -344,7 +344,6 @@ static int atao_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->maxdata = 0x0fff; s->range_table = it->options[3] ? &range_unipolar10 : &range_bipolar10; s->insn_write = atao_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/ni_atmio16d.c b/drivers/staging/comedi/drivers/ni_atmio16d.c index d0ac49e..c484c89 100644 --- a/drivers/staging/comedi/drivers/ni_atmio16d.c +++ b/drivers/staging/comedi/drivers/ni_atmio16d.c @@ -692,7 +692,6 @@ static int atmio16d_attach(struct comedi_device *dev, break; } s->insn_write = atmio16d_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/ni_mio_common.c b/drivers/staging/comedi/drivers/ni_mio_common.c index 97869ce..353c17b 100644 --- a/drivers/staging/comedi/drivers/ni_mio_common.c +++ b/drivers/staging/comedi/drivers/ni_mio_common.c @@ -5441,7 +5441,6 @@ static int ni_E_init(struct comedi_device *dev, s->range_table = board->ao_range_table; s->insn_config = ni_ao_insn_config; s->insn_write = ni_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/pcl711.c b/drivers/staging/comedi/drivers/pcl711.c index 93fa4b8..938aebc 100644 --- a/drivers/staging/comedi/drivers/pcl711.c +++ b/drivers/staging/comedi/drivers/pcl711.c @@ -497,7 +497,6 @@ static int pcl711_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->maxdata = 0xfff; s->range_table = &range_bipolar5; s->insn_write = pcl711_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/pcl726.c b/drivers/staging/comedi/drivers/pcl726.c index a1ac567..86f713f 100644 --- a/drivers/staging/comedi/drivers/pcl726.c +++ b/drivers/staging/comedi/drivers/pcl726.c @@ -376,7 +376,6 @@ static int pcl726_attach(struct comedi_device *dev, s->maxdata = 0x0fff; s->range_table_list = devpriv->rangelist; s->insn_write = pcl726_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/pcl812.c b/drivers/staging/comedi/drivers/pcl812.c index c3499aa..ac243ca 100644 --- a/drivers/staging/comedi/drivers/pcl812.c +++ b/drivers/staging/comedi/drivers/pcl812.c @@ -1324,7 +1324,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it) break; } s->insn_write = pcl812_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/pcl818.c b/drivers/staging/comedi/drivers/pcl818.c index f1e0f36..8edea35 100644 --- a/drivers/staging/comedi/drivers/pcl818.c +++ b/drivers/staging/comedi/drivers/pcl818.c @@ -1158,7 +1158,6 @@ static int pcl818_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->range_table = &range_unknown; } s->insn_write = pcl818_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c index 985fabd..f0059e9 100644 --- a/drivers/staging/comedi/drivers/pcmmio.c +++ b/drivers/staging/comedi/drivers/pcmmio.c @@ -732,7 +732,6 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->maxdata = 0xffff; s->range_table = &pcmmio_ao_ranges; s->insn_write = pcmmio_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index f77485b..9609811 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c @@ -740,7 +740,6 @@ static int daqp_auto_attach(struct comedi_device *dev, s->maxdata = 0x0fff; s->range_table = &range_bipolar5; s->insn_write = daqp_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/rtd520.c b/drivers/staging/comedi/drivers/rtd520.c index fb71fd6..581aa58 100644 --- a/drivers/staging/comedi/drivers/rtd520.c +++ b/drivers/staging/comedi/drivers/rtd520.c @@ -1263,7 +1263,6 @@ static int rtd_auto_attach(struct comedi_device *dev, s->maxdata = 0x0fff; s->range_table = &rtd_ao_range; s->insn_write = rtd_ao_winsn; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c index e3d9f44..67b4b37 100644 --- a/drivers/staging/comedi/drivers/rti800.c +++ b/drivers/staging/comedi/drivers/rti800.c @@ -313,7 +313,6 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it) ? rti800_ao_ranges[it->options[7]] : &range_unknown; s->insn_write = rti800_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/rti802.c b/drivers/staging/comedi/drivers/rti802.c index c81b01c..96c3974 100644 --- a/drivers/staging/comedi/drivers/rti802.c +++ b/drivers/staging/comedi/drivers/rti802.c @@ -100,7 +100,6 @@ static int rti802_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->maxdata = 0xfff; s->n_chan = 8; s->insn_write = rti802_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c index 75872c6..6f3e8a0 100644 --- a/drivers/staging/comedi/drivers/s526.c +++ b/drivers/staging/comedi/drivers/s526.c @@ -583,7 +583,6 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it) s->maxdata = 0xffff; s->range_table = &range_bipolar10; s->insn_write = s526_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index fc7d8a5..14932c5 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -2801,7 +2801,6 @@ static int s626_auto_attach(struct comedi_device *dev, s->maxdata = 0x3fff; s->range_table = &range_bipolar10; s->insn_write = s626_ao_insn_write; - s->insn_read = comedi_readback_insn_read; ret = comedi_alloc_subdev_readback(s); if (ret) -- 2.0.3 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel