On 2013-08-26 23:27, H Hartley Sweeten wrote:
These drivers all improperly implement the (*insn_config) for a DIO subdevice. They all treat the data[0] value as a flag to configure the channel in insn->chanspec as either an output or an input. The data[0] value is actually the 'instruction' to be performed on the channel. Use the comedi_dio_insn_config() helper to properly handle instructions. H Hartley Sweeten (4): staging: comedi: dt2817: fix dt2817_dio_insn_config() staging: comedi: dt282x: fix dt282x_dio_insn_config() staging: comedi: dmm32at: fix dmm32at_dio_insn_config() staging: comedi: ni_atmio16d: fix atmio16d_dio_insn_config() drivers/staging/comedi/drivers/dmm32at.c | 35 +++++++++++++++------------- drivers/staging/comedi/drivers/dt2817.c | 30 +++++++++++------------- drivers/staging/comedi/drivers/dt282x.c | 25 +++++++++++--------- drivers/staging/comedi/drivers/ni_atmio16d.c | 22 ++++++++++------- 4 files changed, 60 insertions(+), 52 deletions(-)
This changes the behaviour of some oddball drivers in favour of consistency, which isn't a bad thing. The affected drivers now support INSN_CONFIG_DIO_QUERY properly instead of treating it like INSN_CONFIG_DIO_OUTPUT (basically, anything other than INSN_CONFIG_DIO_INPUT was treated like INSN_CONFIG_DIO_OUTPUT). (The "ni_atmio16d" driver tried to be clever in allowing several channels to be configured at once.)
Looks good! Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx> -- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@xxxxxxxxx> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=- _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel