[PATCH 00/46] staging: comedi: cleanup step 3 of do_cmdtest functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Step 3 of the do_cmdtest functions validates the arguments for the
command to be executed. Most of these are simple tests to see if the
argument "is" a value, a "min" value, or a "max" value. Each of these
tests then clamps the argument to the value if it fails the test.

Introduce three new helper functions in comedi_fc.h to handle these
tests.

Use the new helpers to remove the boilerplate code from the drivers.

H Hartley Sweeten (46):
  staging: comedi: comedi_fc.h: introduce new helpers for do_cmdtest step 3
  staging: comedi: 8255: use cfc_check_trigger_arg_*() helpers
  staging: comedi: comedi_parport: use cfc_check_trigger_arg_*() helpers
  staging: comedi: addi_apci_1032: use cfc_check_trigger_arg_*() helpers
  staging: comedi: amplc_dio200: use cfc_check_trigger_arg_*() helpers
  staging: comedi: amplc_pc236: use cfc_check_trigger_arg_*() helpers
  staging: comedi: ni_6527: use cfc_check_trigger_arg_*() helpers
  staging: comedi: ni_65xx: use cfc_check_trigger_arg_*() helpers
  staging: comedi: pcm_common: use cfc_check_trigger_arg_*() helpers
  staging: comedi: das800: use cfc_check_trigger_arg_*() helpers
  staging: comedi: comedi_test: use cfc_check_trigger_arg_*() helpers
  staging: comedi: hwdrv_apci3120: use cfc_check_trigger_arg_*() helpers
  staging: comedi: adl_pci9111: use cfc_check_trigger_arg_*() helpers
  staging: comedi: adl_pci9118: use cfc_check_trigger_arg_*() helpers
  staging: comedi: adv_pci1710: use cfc_check_trigger_arg_*() helpers
  staging: comedi: amplc_pci224: use cfc_check_trigger_arg_*() helpers
  staging: comedi: amplc_pci230: use cfc_check_trigger_arg_*() helpers
  staging: comedi: cb_das16_cs: use cfc_check_trigger_arg_*() helpers
  staging: comedi: cb_pcidas: use cfc_check_trigger_arg_*() helpers
  staging: comedi: cb_pcidas64: use cfc_check_trigger_arg_*() helpers
  staging: comedi: das16: use cfc_check_trigger_arg_*() helpers
  staging: comedi: das16m1: use cfc_check_trigger_arg_*() helpers
  staging: comedi: das1800: use cfc_check_trigger_arg_*() helpers
  staging: comedi: dmm32at: use cfc_check_trigger_arg_*() helpers
  staging: comedi: dt2814: use cfc_check_trigger_arg_*() helpers
  staging: comedi: dt282x: use cfc_check_trigger_arg_*() helpers
  staging: comedi: dt3000: use cfc_check_trigger_arg_*() helpers
  staging: comedi: gsc_hpdi: use cfc_check_trigger_arg_*() helpers
  staging: comedi: gsc_hpdi: cleanup step 3 of me4000_ai_do_cmd_test()
  staging: comedi: ni_at_a2150: use cfc_check_trigger_arg_*() helpers
  staging: comedi: ni_atmio16d: use cfc_check_trigger_arg_*() helpers
  staging: comedi: ni_labpc: use cfc_check_trigger_arg_*() helpers
  staging: comedi: ni_pcidio: use cfc_check_trigger_arg_*() helpers
  staging: comedi: ni_tiocmd: use cfc_check_trigger_arg_*() helpers
  staging: comedi: pcl711: use cfc_check_trigger_arg_*() helpers
  staging: comedi: pcl812: use cfc_check_trigger_arg_*() helpers
  staging: comedi: pcl816: use cfc_check_trigger_arg_*() helpers
  staging: comedi: pcl818: use cfc_check_trigger_arg_*() helpers
  staging: comedi: quatech_daqp_cs: use cfc_check_trigger_arg_*() helpers
  staging: comedi: rtd520: use cfc_check_trigger_arg_*() helpers
  staging: comedi: s626: use cfc_check_trigger_arg_*() helpers
  staging: comedi: skel: use cfc_check_trigger_arg_*() helpers
  staging: comedi: usbdux: use cfc_check_trigger_arg_*() helpers
  staging: comedi: usbduxfast: use cfc_check_trigger_arg_*() helpers
  staging: comedi: usbduxsigma: use cfc_check_trigger_arg_*() helpers
  staging: comedi: ni_mio_common: use cfc_check_trigger_arg_*() helpers

 drivers/staging/comedi/drivers/8255.c              |  27 +--
 .../comedi/drivers/addi-data/hwdrv_apci3120.c      |  56 ++-----
 drivers/staging/comedi/drivers/addi_apci_1032.c    |  27 +--
 drivers/staging/comedi/drivers/adl_pci9111.c       |  59 ++-----
 drivers/staging/comedi/drivers/adl_pci9118.c       |  72 +++-----
 drivers/staging/comedi/drivers/adv_pci1710.c       |  48 ++----
 drivers/staging/comedi/drivers/amplc_dio200.c      |  34 +---
 drivers/staging/comedi/drivers/amplc_pc236.c       |  27 +--
 drivers/staging/comedi/drivers/amplc_pci224.c      |  53 ++----
 drivers/staging/comedi/drivers/amplc_pci230.c      | 120 +++++--------
 drivers/staging/comedi/drivers/cb_das16_cs.c       |  64 +++----
 drivers/staging/comedi/drivers/cb_pcidas.c         |  80 +++------
 drivers/staging/comedi/drivers/cb_pcidas64.c       |  76 +++------
 drivers/staging/comedi/drivers/comedi_fc.h         |  44 +++++
 drivers/staging/comedi/drivers/comedi_parport.c    |  27 +--
 drivers/staging/comedi/drivers/comedi_test.c       |  63 ++-----
 drivers/staging/comedi/drivers/das16.c             |  55 ++----
 drivers/staging/comedi/drivers/das16m1.c           |  35 +---
 drivers/staging/comedi/drivers/das1800.c           |  38 ++---
 drivers/staging/comedi/drivers/das800.c            |  44 ++---
 drivers/staging/comedi/drivers/dmm32at.c           |  53 ++----
 drivers/staging/comedi/drivers/dt2814.c            |  42 ++---
 drivers/staging/comedi/drivers/dt282x.c            |  82 +++------
 drivers/staging/comedi/drivers/dt3000.c            |  53 ++----
 drivers/staging/comedi/drivers/gsc_hpdi.c          |  19 +--
 drivers/staging/comedi/drivers/me4000.c            |  17 +-
 drivers/staging/comedi/drivers/ni_6527.c           |  28 +---
 drivers/staging/comedi/drivers/ni_65xx.c           |  28 +---
 drivers/staging/comedi/drivers/ni_at_a2150.c       |  44 ++---
 drivers/staging/comedi/drivers/ni_atmio16d.c       |  43 ++---
 drivers/staging/comedi/drivers/ni_labpc.c          |  54 ++----
 drivers/staging/comedi/drivers/ni_mio_common.c     | 186 ++++++---------------
 drivers/staging/comedi/drivers/ni_pcidio.c         |  36 ++--
 drivers/staging/comedi/drivers/ni_tiocmd.c         |  40 ++---
 drivers/staging/comedi/drivers/pcl711.c            |  36 ++--
 drivers/staging/comedi/drivers/pcl812.c            |  58 ++-----
 drivers/staging/comedi/drivers/pcl816.c            |  50 ++----
 drivers/staging/comedi/drivers/pcl818.c            |  48 ++----
 drivers/staging/comedi/drivers/pcm_common.c        |  34 +---
 drivers/staging/comedi/drivers/quatech_daqp_cs.c   |  46 ++---
 drivers/staging/comedi/drivers/rtd520.c            |  72 ++++----
 drivers/staging/comedi/drivers/s626.c              |  78 +++------
 drivers/staging/comedi/drivers/skel.c              |  63 ++-----
 drivers/staging/comedi/drivers/usbdux.c            | 108 +++---------
 drivers/staging/comedi/drivers/usbduxfast.c        |  38 +----
 drivers/staging/comedi/drivers/usbduxsigma.c       | 105 +++---------
 46 files changed, 746 insertions(+), 1764 deletions(-)

-- 
1.7.11

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux