On 21/11/2014 17:19, H Hartley Sweeten wrote:
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(-)
Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx> -- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@xxxxxxxxx> )=- -=( Web: http://www.mev.co.uk/ )=- _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel