[PATCH 0/4] staging: comedi: tidy up dio subdevice (*insn_config) boilerplate

H Hartley Sweeten hsweeten at visionengravers.com
Mon Aug 5 21:58:57 UTC 2013


All the comedi drivers that have DIO subdevices implement a (*insn_config)
callback. This callback always handles the INSN_CONFIG_DIO_{INPUT,OUTPUT}
istructions to configure the dio channels. They also always handle the
INSN_CONFIG_DIO_QUERY instruction to query the configuration of a dio channel.

Introduce, and use, a new exported function in the comedi core to handle this
boilerplate.

H Hartley Sweeten (4):
  staging: comedi: core: introduce comedi_dio_insn_config()
  staging: comedi: skel: use comedi_dio_insn_config()
  staging: comedi: drivers: use comedi_dio_insn_config() for simple cases
  staging: comedi: drivers: use comedi_dio_insn_config() for complex cases

 drivers/staging/comedi/comedidev.h                 |   4 +
 drivers/staging/comedi/drivers.c                   |  40 +++++++
 drivers/staging/comedi/drivers/8255.c              |  42 +++----
 drivers/staging/comedi/drivers/addi_apci_16xx.c    |  42 +++----
 drivers/staging/comedi/drivers/addi_apci_3xxx.c    |  36 +++---
 drivers/staging/comedi/drivers/adv_pci1723.c       |  43 +++----
 .../staging/comedi/drivers/amplc_dio200_common.c   |  42 +++----
 drivers/staging/comedi/drivers/cb_das16_cs.c       |  31 ++----
 drivers/staging/comedi/drivers/cb_pcidas64.c       |  25 ++---
 drivers/staging/comedi/drivers/comedi_bond.c       |  51 +++------
 drivers/staging/comedi/drivers/dt2801.c            |  31 ++----
 drivers/staging/comedi/drivers/dt3000.c            |  41 +++----
 drivers/staging/comedi/drivers/gsc_hpdi.c          |  33 ++----
 drivers/staging/comedi/drivers/ii_pci20kc.c        |  37 +++----
 drivers/staging/comedi/drivers/me4000.c            | 123 +++++++--------------
 drivers/staging/comedi/drivers/me_daq.c            |  50 ++++-----
 drivers/staging/comedi/drivers/ni_65xx.c           |  42 +++----
 drivers/staging/comedi/drivers/ni_670x.c           |  25 ++---
 drivers/staging/comedi/drivers/ni_at_ao.c          |  55 ++++-----
 drivers/staging/comedi/drivers/ni_daq_700.c        |  24 ++--
 drivers/staging/comedi/drivers/ni_mio_common.c     |  57 ++--------
 drivers/staging/comedi/drivers/ni_pcidio.c         |  26 +----
 drivers/staging/comedi/drivers/pcm3724.c           |  45 +++-----
 drivers/staging/comedi/drivers/pcmmio.c            |  71 +++---------
 drivers/staging/comedi/drivers/pcmuio.c            |  24 ++--
 drivers/staging/comedi/drivers/rtd520.c            |  20 +---
 drivers/staging/comedi/drivers/s526.c              |  45 ++++----
 drivers/staging/comedi/drivers/s626.c              |  22 +---
 drivers/staging/comedi/drivers/skel.c              |  42 ++++---
 drivers/staging/comedi/drivers/ssv_dnp.c           |  69 ++++--------
 drivers/staging/comedi/drivers/usbdux.c            |  19 +---
 drivers/staging/comedi/drivers/usbduxsigma.c       |  20 +---
 32 files changed, 462 insertions(+), 815 deletions(-)

-- 
1.8.3.2



More information about the devel mailing list