#define COMEDI_UNLOCK _IO(CIO, 6)
 #define COMEDI_CANCEL _IO(CIO, 7)
 #define COMEDI_RANGEINFO _IOR(CIO, 8, comedi_rangeinfo)
-#define COMEDI_CMD _IOR(CIO, 9, comedi_cmd)
-#define COMEDI_CMDTEST _IOR(CIO, 10, comedi_cmd)
+#define COMEDI_CMD _IOR(CIO, 9, struct comedi_cmd)
+#define COMEDI_CMDTEST _IOR(CIO, 10, struct comedi_cmd)
 #define COMEDI_INSNLIST _IOR(CIO, 11, comedi_insnlist)
 #define COMEDI_INSN _IOR(CIO, 12, comedi_insn)
 #define COMEDI_BUFCONFIG _IOR(CIO, 13, comedi_bufconfig)
 
 /* structures */
 
-typedef struct comedi_cmd_struct comedi_cmd;
 typedef struct comedi_insn_struct comedi_insn;
 typedef struct comedi_insnlist_struct comedi_insnlist;
 typedef struct comedi_chaninfo_struct comedi_chaninfo;
        comedi_insn *insns;
 };
 
-struct comedi_cmd_struct {
+struct comedi_cmd {
        unsigned int subdev;
        unsigned int flags;
 
 
 }
 
 /* Copy 32-bit cmd structure to native cmd structure. */
-static int get_compat_cmd(comedi_cmd __user *cmd,
+static int get_compat_cmd(struct comedi_cmd __user *cmd,
                struct comedi32_cmd_struct __user *cmd32)
 {
        int err;
 }
 
 /* Copy native cmd structure to 32-bit cmd structure. */
-static int put_compat_cmd(struct comedi32_cmd_struct __user *cmd32, comedi_cmd __user *cmd)
+static int put_compat_cmd(struct comedi32_cmd_struct __user *cmd32, struct comedi_cmd __user *cmd)
 {
        int err;
        unsigned int temp;
 /* Handle 32-bit COMEDI_CMD ioctl. */
 static int compat_cmd(struct file *file, unsigned long arg)
 {
-       comedi_cmd __user *cmd;
+       struct comedi_cmd __user *cmd;
        struct comedi32_cmd_struct __user *cmd32;
        int rc;
 
 /* Handle 32-bit COMEDI_CMDTEST ioctl. */
 static int compat_cmdtest(struct file *file, unsigned long arg)
 {
-       comedi_cmd __user *cmd;
+       struct comedi_cmd __user *cmd;
        struct comedi32_cmd_struct __user *cmd32;
        int rc, err;
 
 
 */
 static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file)
 {
-       comedi_cmd user_cmd;
+       struct comedi_cmd user_cmd;
        struct comedi_subdevice *s;
        struct comedi_async *async;
        int ret = 0;
        unsigned int *chanlist_saver = NULL;
 
-       if (copy_from_user(&user_cmd, arg, sizeof(comedi_cmd))) {
+       if (copy_from_user(&user_cmd, arg, sizeof(struct comedi_cmd))) {
                DPRINTK("bad cmd address\n");
                return -EFAULT;
        }
                /* restore chanlist pointer before copying back */
                user_cmd.chanlist = chanlist_saver;
                user_cmd.data = NULL;
-               if (copy_to_user(arg, &user_cmd, sizeof(comedi_cmd))) {
+               if (copy_to_user(arg, &user_cmd, sizeof(struct comedi_cmd))) {
                        DPRINTK("fault writing cmd\n");
                        ret = -EFAULT;
                        goto cleanup;
 */
 static int do_cmdtest_ioctl(struct comedi_device *dev, void *arg, void *file)
 {
-       comedi_cmd user_cmd;
+       struct comedi_cmd user_cmd;
        struct comedi_subdevice *s;
        int ret = 0;
        unsigned int *chanlist = NULL;
        unsigned int *chanlist_saver = NULL;
 
-       if (copy_from_user(&user_cmd, arg, sizeof(comedi_cmd))) {
+       if (copy_from_user(&user_cmd, arg, sizeof(struct comedi_cmd))) {
                DPRINTK("bad cmd address\n");
                return -EFAULT;
        }
        /* restore chanlist pointer before copying back */
        user_cmd.chanlist = chanlist_saver;
 
-       if (copy_to_user(arg, &user_cmd, sizeof(comedi_cmd))) {
+       if (copy_to_user(arg, &user_cmd, sizeof(struct comedi_cmd))) {
                DPRINTK("bad cmd address\n");
                ret = -EFAULT;
                goto cleanup;
 
                unsigned int *);
 
        int (*do_cmd) (struct comedi_device *, struct comedi_subdevice *);
-       int (*do_cmdtest) (struct comedi_device *, struct comedi_subdevice *, comedi_cmd *);
+       int (*do_cmdtest) (struct comedi_device *, struct comedi_subdevice *, struct comedi_cmd *);
        int (*poll) (struct comedi_device *, struct comedi_subdevice *);
        int (*cancel) (struct comedi_device *, struct comedi_subdevice *);
        /* int (*do_lock)(struct comedi_device *,struct comedi_subdevice *); */
 
        unsigned int events;    /* events that have occurred */
 
-       comedi_cmd cmd;
+       struct comedi_cmd cmd;
 
        wait_queue_head_t wait_head;
 
 
 int comedi_register_callback(void *dev, unsigned int subdev,
        unsigned int mask, int (*cb) (unsigned int, void *), void *arg);
 
-int comedi_command(void *dev, comedi_cmd *cmd);
-int comedi_command_test(void *dev, comedi_cmd *cmd);
+int comedi_command(void *dev, struct comedi_cmd *cmd);
+int comedi_command_test(void *dev, struct comedi_cmd *cmd);
 int comedi_trigger(void *dev, unsigned int subdev, struct comedi_trig *it);
 int __comedi_trigger(void *dev, unsigned int subdev, struct comedi_trig *it);
 int comedi_data_write(void *dev, unsigned int subdev, unsigned int chan,
 int comedi_register_callback(unsigned int minor, unsigned int subdev,
        unsigned int mask, int (*cb) (unsigned int, void *), void *arg);
 
-int comedi_command(unsigned int minor, comedi_cmd *cmd);
-int comedi_command_test(unsigned int minor, comedi_cmd *cmd);
+int comedi_command(unsigned int minor, struct comedi_cmd *cmd);
+int comedi_command_test(unsigned int minor, struct comedi_cmd *cmd);
 int comedi_trigger(unsigned int minor, unsigned int subdev, struct comedi_trig *it);
 int __comedi_trigger(unsigned int minor, unsigned int subdev, struct comedi_trig *it);
 int comedi_data_write(unsigned int dev, unsigned int subdev, unsigned int chan,
 
 }
 
 static int subdev_8255_cmdtest(struct comedi_device *dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        unsigned int tmp;
 
                                           unsigned int *data);
        int (*i_hwdrv_CommandTestAnalogInput)(struct comedi_device *dev,
                                              struct comedi_subdevice *s,
-                                             comedi_cmd *cmd);
+                                             struct comedi_cmd *cmd);
        int (*i_hwdrv_CommandAnalogInput)(struct comedi_device *dev,
                                          struct comedi_subdevice *s);
        int (*i_hwdrv_CancelAnalogInput)(struct comedi_device *dev,
 
 /*
 +----------------------------------------------------------------------------+
 | Function name     :int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev|
-|                      ,struct comedi_subdevice *s,comedi_cmd *cmd)                                     |
+|                      ,struct comedi_subdevice *s,struct comedi_cmd *cmd)                                      |
 |                                                                                                               |
 +----------------------------------------------------------------------------+
 | Task              : Test validity for a command for cyclic anlog input     |
 +----------------------------------------------------------------------------+
 | Input Parameters  : struct comedi_device *dev                                                                         |
 |                     struct comedi_subdevice *s                                                                        |
-|                     comedi_cmd *cmd                                                           |
+|                     struct comedi_cmd *cmd                                                            |
 +----------------------------------------------------------------------------+
 | Return Value      :0                                                                      |
 |                                                                                                                           |
 */
 
 int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;                // divisor1,divisor2;
 
 int i_APCI3120_CommandAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        //loading private structure with cmd structure inputs
        devpriv->ui_AiFlags = cmd->flags;
 
 int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
                                   comedi_insn *insn, unsigned int *data);
 int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
-                                     comedi_cmd *cmd);
+                                     struct comedi_cmd *cmd);
 int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
 //int i_APCI3120_CancelAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
 int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s);
 
 /*
   +----------------------------------------------------------------------------+
   | Function name     :int i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev|
-  |                    ,struct comedi_subdevice *s,comedi_cmd *cmd)                             |
+  |                    ,struct comedi_subdevice *s,struct comedi_cmd *cmd)                              |
   |                                                                                                             |
   +----------------------------------------------------------------------------+
   | Task              : Test validity for a command for cyclic anlog input     |
   +----------------------------------------------------------------------------+
   | Input Parameters  : struct comedi_device *dev                                                                       |
   |                     struct comedi_subdevice *s                                                                      |
-  |                     comedi_cmd *cmd                                                         |
+  |                     struct comedi_cmd *cmd                                                          |
   |                                                                                                                     |
   |
   |                                                                                                                     |
 */
 
 int i_APCI3200_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
 
        int err = 0;
 
 int i_APCI3200_CommandAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        UINT ui_Configuration = 0;
        //INT  i_CurrentSource = 0;
        UINT ui_Trigger = 0;
 
 INT i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s);
 INT i_APCI3200_InterruptHandleEos(struct comedi_device *dev);
 INT i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
-                                     comedi_cmd *cmd);
+                                     struct comedi_cmd *cmd);
 INT i_APCI3200_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
 INT i_APCI3200_ReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
                                comedi_insn *insn, unsigned int *data);
 
 
 static int
 pci9111_ai_do_cmd_test(struct comedi_device * dev,
-       struct comedi_subdevice * s, comedi_cmd * cmd)
+       struct comedi_subdevice * s, struct comedi_cmd * cmd)
 {
        int tmp;
        int error = 0;
 
 static int pci9111_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * subdevice)
 {
-       comedi_cmd *async_cmd = &subdevice->async->cmd;
+       struct comedi_cmd *async_cmd = &subdevice->async->cmd;
 
        if (!dev->irq) {
                comedi_error(dev,
 
 ==============================================================================
 */
 static int pci9118_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp, divisor1, divisor2;
 */
 static int pci9118_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned int addchans = 0;
        int ret = 0;
 
 
 /*
 ==============================================================================
 */
-static void pci171x_cmdtest_out(int e, comedi_cmd * cmd)
+static void pci171x_cmdtest_out(int e, struct comedi_cmd * cmd)
 {
        rt_printk("adv_pci1710 e=%d startsrc=%x scansrc=%x convsrc=%x\n", e,
                cmd->start_src, cmd->scan_begin_src, cmd->convert_src);
 ==============================================================================
 */
 static int pci171x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp, divisor1, divisor2;
 */
 static int pci171x_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        DPRINTK("adv_pci1710 EDBG: BGN: pci171x_ai_cmd(...)\n");
        devpriv->ai_n_chan = cmd->chanlist_len;
 
        unsigned int n;
        unsigned isn_bits;
        dio200_subdev_intr *subpriv = s->private;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int retval = 0;
 
        if (!subpriv->continuous && subpriv->stopcount == 0) {
  */
 static int
 dio200_subdev_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        unsigned int tmp;
  */
 static int dio200_subdev_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        dio200_subdev_intr *subpriv = s->private;
        unsigned long flags;
        int event = 0;
 
 static int pc236_intr_insn(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
 static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int pc236_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int pc236_intr_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static irqreturn_t pc236_interrupt(int irq, void *d PT_REGS_ARG);
  * Copied from the comedi_parport driver.
  */
 static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
  */
 static void pci224_ao_start(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned long flags;
 
        set_bit(AO_CMD_STARTED, &devpriv->state);
  */
 static void pci224_ao_handle_fifo(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned int num_scans;
        unsigned int room;
        unsigned short dacstat;
  * 'do_cmdtest' function for AO subdevice.
  */
 static int
-pci224_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comedi_cmd * cmd)
+pci224_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, struct comedi_cmd * cmd)
 {
        int err = 0;
        unsigned int tmp;
  */
 static int pci224_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int range;
        unsigned int i, j;
        unsigned int ch;
 {
        struct comedi_device *dev = d;
        struct comedi_subdevice *s = &dev->subdevices[0];
-       comedi_cmd *cmd;
+       struct comedi_cmd *cmd;
        unsigned char intstat, valid_intstat;
        unsigned char curenab;
        int retval = 0;
 
 static void pci230_cancel_ct(struct comedi_device * dev, unsigned int ct);
 static irqreturn_t pci230_interrupt(int irq, void *d PT_REGS_ARG);
 static int pci230_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int pci230_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int pci230_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static void pci230_ao_stop(struct comedi_device * dev, struct comedi_subdevice * s);
 static void pci230_handle_ao_nofifo(struct comedi_device * dev, struct comedi_subdevice * s);
 static int pci230_handle_ao_fifo(struct comedi_device * dev, struct comedi_subdevice * s);
 static int pci230_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int pci230_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int pci230_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static void pci230_ai_stop(struct comedi_device * dev, struct comedi_subdevice * s);
 }
 
 static int pci230_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        unsigned int tmp;
 static void pci230_ao_start(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned long irqflags;
 
        set_bit(AO_CMD_STARTED, &devpriv->state);
        unsigned int range;
 
        /* Get the command. */
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        if (cmd->scan_begin_src == TRIG_TIMER) {
                /* Claim Z2-CT1. */
        return 0;
 }
 
-static int pci230_ai_check_scan_period(comedi_cmd * cmd)
+static int pci230_ai_check_scan_period(struct comedi_cmd * cmd)
 {
        unsigned int min_scan_period, chanlist_len;
        int err = 0;
 }
 
 static int pci230_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        unsigned int tmp;
 static void pci230_ai_update_fifo_trigger_level(struct comedi_device * dev,
        struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned int scanlen = cmd->scan_end_arg;
        unsigned int wake;
        unsigned short triglev;
        unsigned long irqflags;
        unsigned short conv;
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
 
        set_bit(AI_CMD_STARTED, &devpriv->state);
        if (!devpriv->ai_continuous && (devpriv->ai_scan_count == 0)) {
 
        /* Get the command. */
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
 
        /*
         * Determine which shared resources are needed.
        short data;
        int i, ret;
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
 
        if (!devpriv->ao_continuous && (devpriv->ao_scan_count == 0)) {
                return;
 static int pci230_handle_ao_fifo(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned int num_scans;
        unsigned int room;
        unsigned short dacstat;
        unsigned long irqflags;
        unsigned char intsrc;
        int started;
-       comedi_cmd *cmd;
+       struct comedi_cmd *cmd;
 
        comedi_spin_lock_irqsave(&devpriv->ao_stop_spinlock, irqflags);
        started = test_and_clear_bit(AO_CMD_STARTED, &devpriv->state);
 static void pci230_ai_stop(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        unsigned long irqflags;
-       comedi_cmd *cmd;
+       struct comedi_cmd *cmd;
        int started;
 
        comedi_spin_lock_irqsave(&devpriv->ai_stop_spinlock, irqflags);
 
        comedi_insn * insn, unsigned int * data);
 static int das16cs_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int das16cs_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int das16cs_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
 static int das16cs_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
 }
 
 static int das16cs_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
        comedi_insn * insn, unsigned int * data);
 static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int cb_pcidas_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int cb_pcidas_ao_inttrig(struct comedi_device *dev,
                                struct comedi_subdevice *subdev,
                                unsigned int trig_num);
 static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static irqreturn_t cb_pcidas_interrupt(int irq, void *d PT_REGS_ARG);
 static void handle_ao_interrupt(struct comedi_device * dev, unsigned int status);
 static int cb_pcidas_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 }
 
 static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned int bits;
        unsigned long flags;
 
 }
 
 static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 static int cb_pcidas_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned int i;
        unsigned long flags;
 
 {
        unsigned int num_bytes, num_points = thisboard->fifo_size;
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned long flags;
 
        if (trig_num != 0)
 {
        struct comedi_subdevice *s = dev->write_subdev;
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned int half_fifo = thisboard->fifo_size / 2;
        unsigned int num_points;
        unsigned int flags;
 
        comedi_insn * insn, unsigned int * data);
 static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * subdev,
        unsigned int trig_num);
 static int ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG);
 static int ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static int ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
        comedi_insn * insn, unsigned int * data);
 static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
-static void check_adc_timing(struct comedi_device * dev, comedi_cmd * cmd);
+static void check_adc_timing(struct comedi_device * dev, struct comedi_cmd * cmd);
 static unsigned int get_divisor(unsigned int ns, unsigned int flags);
 static void i2c_write(struct comedi_device * dev, unsigned int address,
        const uint8_t * data, unsigned int length);
        unsigned int num_entries);
 static void disable_ai_pacing(struct comedi_device * dev);
 static void disable_ai_interrupts(struct comedi_device * dev);
-static void enable_ai_interrupts(struct comedi_device * dev, const comedi_cmd * cmd);
+static void enable_ai_interrupts(struct comedi_device * dev, const struct comedi_cmd * cmd);
 static unsigned int get_ao_divisor(unsigned int ns, unsigned int flags);
-static void load_ao_dma(struct comedi_device * dev, const comedi_cmd * cmd);
+static void load_ao_dma(struct comedi_device * dev, const struct comedi_cmd * cmd);
 
 COMEDI_PCI_INITCLEANUP(driver_cb_pcidas, pcidas64_pci_table);
 
 }
 
 static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
        return 0;
 }
 
-static int use_hw_sample_counter(comedi_cmd * cmd)
+static int use_hw_sample_counter(struct comedi_cmd * cmd)
 {
 // disable for now until I work out a race
        return 0;
                return 0;
 }
 
-static void setup_sample_counters(struct comedi_device * dev, comedi_cmd * cmd)
+static void setup_sample_counters(struct comedi_device * dev, struct comedi_cmd * cmd)
 {
        if (cmd->stop_src == TRIG_COUNT) {
                // set software count
        DEBUG_PRINT("intr enable bits 0x%x\n", priv(dev)->intr_enable_bits);
 }
 
-static void enable_ai_interrupts(struct comedi_device * dev, const comedi_cmd * cmd)
+static void enable_ai_interrupts(struct comedi_device * dev, const struct comedi_cmd * cmd)
 {
        uint32_t bits;
        unsigned long flags;
 }
 
 static uint32_t ai_convert_counter_6xxx(const struct comedi_device * dev,
-       const comedi_cmd * cmd)
+       const struct comedi_cmd * cmd)
 {
        // supposed to load counter with desired divisor minus 3
        return cmd->convert_arg / TIMER_BASE - 3;
 }
 
-static uint32_t ai_scan_counter_6xxx(struct comedi_device * dev, comedi_cmd * cmd)
+static uint32_t ai_scan_counter_6xxx(struct comedi_device * dev, struct comedi_cmd * cmd)
 {
        uint32_t count;
        // figure out how long we need to delay at end of scan
        return count - 3;
 }
 
-static uint32_t ai_convert_counter_4020(struct comedi_device * dev, comedi_cmd * cmd)
+static uint32_t ai_convert_counter_4020(struct comedi_device * dev, struct comedi_cmd * cmd)
 {
        unsigned int divisor;
 
 }
 
 static void select_master_clock_4020(struct comedi_device * dev,
-       const comedi_cmd * cmd)
+       const struct comedi_cmd * cmd)
 {
        // select internal/external master clock
        priv(dev)->hw_config_bits &= ~MASTER_CLOCK_4020_MASK;
                priv(dev)->main_iobase + HW_CONFIG_REG);
 }
 
-static void select_master_clock(struct comedi_device * dev, const comedi_cmd * cmd)
+static void select_master_clock(struct comedi_device * dev, const struct comedi_cmd * cmd)
 {
        switch (board(dev)->layout) {
        case LAYOUT_4020:
        comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
 }
 
-static void set_ai_pacing(struct comedi_device * dev, comedi_cmd * cmd)
+static void set_ai_pacing(struct comedi_device * dev, struct comedi_cmd * cmd)
 {
        uint32_t convert_counter = 0, scan_counter = 0;
 
        DEBUG_PRINT("scan counter 0x%x\n", scan_counter);
 }
 
-static int use_internal_queue_6xxx(const comedi_cmd * cmd)
+static int use_internal_queue_6xxx(const struct comedi_cmd * cmd)
 {
        int i;
        for (i = 0; i + 1 < cmd->chanlist_len; i++) {
        return 1;
 }
 
-static int setup_channel_queue(struct comedi_device * dev, const comedi_cmd * cmd)
+static int setup_channel_queue(struct comedi_device * dev, const struct comedi_cmd * cmd)
 {
        unsigned short bits;
        int i;
 static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        uint32_t bits;
        unsigned int i;
        unsigned long flags;
 {
        struct comedi_subdevice *s = dev->read_subdev;
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned int i;
        uint16_t prepost_bits;
        int read_segment, read_index, write_segment, write_index;
 {
        struct comedi_subdevice *s = dev->read_subdev;
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned int i;
        unsigned int max_transfer = 100000;
        uint32_t fifo_data;
 {
        struct comedi_subdevice *s = dev->read_subdev;
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        uint8_t dma1_status;
        unsigned long flags;
 
        return 1;
 }
 
-static int ao_stopped_by_error(struct comedi_device * dev, const comedi_cmd * cmd)
+static int ao_stopped_by_error(struct comedi_device * dev, const struct comedi_cmd * cmd)
 {
        if (cmd->stop_src == TRIG_NONE)
                return 1;
 {
        struct comedi_subdevice *s = dev->write_subdev;
        struct comedi_async *async;
-       comedi_cmd *cmd;
+       struct comedi_cmd *cmd;
        uint8_t dma0_status;
        unsigned long flags;
 
        return 1;
 }
 
-static void set_dac_control0_reg(struct comedi_device * dev, const comedi_cmd * cmd)
+static void set_dac_control0_reg(struct comedi_device * dev, const struct comedi_cmd * cmd)
 {
        unsigned int bits = DAC_ENABLE_BIT | WAVEFORM_GATE_LEVEL_BIT |
                WAVEFORM_GATE_ENABLE_BIT | WAVEFORM_GATE_SELECT_BIT;
        writew(bits, priv(dev)->main_iobase + DAC_CONTROL0_REG);
 }
 
-static void set_dac_control1_reg(struct comedi_device * dev, const comedi_cmd * cmd)
+static void set_dac_control1_reg(struct comedi_device * dev, const struct comedi_cmd * cmd)
 {
        int i;
 
                priv(dev)->main_iobase + DAC_CONTROL1_REG);
 }
 
-static void set_dac_select_reg(struct comedi_device * dev, const comedi_cmd * cmd)
+static void set_dac_select_reg(struct comedi_device * dev, const struct comedi_cmd * cmd)
 {
        uint16_t bits;
        unsigned int first_channel, last_channel;
        writew(bits, priv(dev)->main_iobase + DAC_SELECT_REG);
 }
 
-static void set_dac_interval_regs(struct comedi_device * dev, const comedi_cmd * cmd)
+static void set_dac_interval_regs(struct comedi_device * dev, const struct comedi_cmd * cmd)
 {
        unsigned int divisor;
 
 }
 
 static unsigned int load_ao_dma_buffer(struct comedi_device * dev,
-       const comedi_cmd * cmd)
+       const struct comedi_cmd * cmd)
 {
        unsigned int num_bytes, buffer_index, prev_buffer_index;
        unsigned int next_bits;
        return num_bytes;
 }
 
-static void load_ao_dma(struct comedi_device * dev, const comedi_cmd * cmd)
+static void load_ao_dma(struct comedi_device * dev, const struct comedi_cmd * cmd)
 {
        unsigned int num_bytes;
        unsigned int next_transfer_addr;
        } while (num_bytes >= DMA_BUFFER_SIZE);
 }
 
-static int prep_ao_dma(struct comedi_device * dev, const comedi_cmd * cmd)
+static int prep_ao_dma(struct comedi_device * dev, const struct comedi_cmd * cmd)
 {
        unsigned int num_bytes;
        int i;
 
 static int ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        if (external_ai_queue_in_use(dev)) {
                warn_external_queue(dev);
 static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
        unsigned int trig_num)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int retval;
 
        if (trig_num != 0)
 }
 
 static int ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
  * sets cmd members appropriately.
  * adc paces conversions from master clock by dividing by (x + 3) where x is 24 bit number
  */
-static void check_adc_timing(struct comedi_device * dev, comedi_cmd * cmd)
+static void check_adc_timing(struct comedi_device *dev, struct comedi_cmd *cmd)
 {
        unsigned int convert_divisor = 0, scan_divisor;
        static const int min_convert_divisor = 3;
 
 static int cb_pcidda_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
 //static int cb_pcidda_ai_cmd(struct comedi_device *dev,struct comedi_subdevice *s);
-//static int cb_pcidda_ai_cmdtest(struct comedi_device *dev,struct comedi_subdevice *s, comedi_cmd *cmd);
+//static int cb_pcidda_ai_cmdtest(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_cmd *cmd);
 //static int cb_pcidda_ns_to_timer(unsigned int *ns,int round);
 static unsigned int cb_pcidda_serial_in(struct comedi_device * dev);
 static void cb_pcidda_serial_out(struct comedi_device * dev, unsigned int value,
 
 #if 0
 static int cb_pcidda_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 }
 
 static int parport_intr_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
-                               comedi_cmd *cmd)
+                               struct comedi_cmd *cmd)
 {
        int err = 0;
        int tmp;
 
        RT_TASK *scan_task;     // rt task that controls conversion timing in a scan
        /* io_function can point to either an input or output function
         * depending on what kind of subdevice we are emulating for */
-       int (*io_function) (struct comedi_device * dev, comedi_cmd * cmd,
+       int (*io_function) (struct comedi_device * dev, struct comedi_cmd * cmd,
                unsigned int index);
        // RTIME has units of 1 = 838 nanoseconds
        // time at which first scan started, used to check scan timing
        RTIME convert_period;
        // flags
        volatile int stop;      // indicates we should stop
-       volatile int rt_task_active;    // indicates rt_task is servicing a comedi_cmd
-       volatile int scan_task_active;  // indicates scan_task is servicing a comedi_cmd
+       volatile int rt_task_active;    // indicates rt_task is servicing a struct comedi_cmd
+       volatile int scan_task_active;  // indicates scan_task is servicing a struct comedi_cmd
        unsigned timer_running:1;
 } timer_private;
 #define devpriv ((timer_private *)dev->private)
 }
 
 // devpriv->io_function for an input subdevice
-static int timer_data_read(struct comedi_device * dev, comedi_cmd * cmd,
+static int timer_data_read(struct comedi_device * dev, struct comedi_cmd * cmd,
        unsigned int index)
 {
        struct comedi_subdevice *s = dev->read_subdev;
 }
 
 // devpriv->io_function for an output subdevice
-static int timer_data_write(struct comedi_device * dev, comedi_cmd * cmd,
+static int timer_data_write(struct comedi_device * dev, struct comedi_cmd * cmd,
        unsigned int index)
 {
        struct comedi_subdevice *s = dev->write_subdev;
 }
 
 // devpriv->io_function for DIO subdevices
-static int timer_dio_read(struct comedi_device * dev, comedi_cmd * cmd,
+static int timer_dio_read(struct comedi_device * dev, struct comedi_cmd * cmd,
        unsigned int index)
 {
        struct comedi_subdevice *s = dev->read_subdev;
        struct comedi_device *dev = (struct comedi_device *) d;
        struct comedi_subdevice *s = dev->subdevices + 0;
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        int i, ret;
        unsigned long long n;
        RTIME scan_start;
 
-       // every comedi_cmd causes one execution of while loop
+       // every struct comedi_cmd causes one execution of while loop
        while (1) {
                devpriv->scan_task_active = 1;
                // each for loop completes one scan
                comedi_event(dev, s);
                async->events = 0;
                devpriv->scan_task_active = 0;
-               // suspend task until next comedi_cmd
+               // suspend task until next struct comedi_cmd
                rt_task_suspend(devpriv->scan_task);
        }
 }
 {
        struct comedi_device *dev = (struct comedi_device *) d;
        struct comedi_subdevice *s = dev->subdevices + 0;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int ret;
        unsigned long long n;
 
-       // every comedi_cmd causes one execution of while loop
+       // every struct comedi_cmd causes one execution of while loop
        while (1) {
                devpriv->rt_task_active = 1;
                devpriv->scan_task_active = 1;
              cleanup:
 
                devpriv->rt_task_active = 0;
-               // suspend until next comedi_cmd
+               // suspend until next struct comedi_cmd
                rt_task_suspend(devpriv->rt_task);
        }
 }
        return comedi_do_insn(devpriv->device, &xinsn);
 }
 
-static int cmdtest_helper(comedi_cmd * cmd,
+static int cmdtest_helper(struct comedi_cmd * cmd,
        unsigned int start_src,
        unsigned int scan_begin_src,
        unsigned int convert_src,
 }
 
 static int timer_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        unsigned int start_src = 0;
 static int timer_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        int ret;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        /* hack attack: drivers are not supposed to do this: */
        dev->rt = 1;
 
-       // make sure tasks have finished cleanup of last comedi_cmd
+       // make sure tasks have finished cleanup of last struct comedi_cmd
        if (devpriv->rt_task_active || devpriv->scan_task_active)
                return -EBUSY;
 
 static int timer_start_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        RTIME now, delay, period;
        int ret;
 
 
 COMEDI_INITCLEANUP(driver_waveform);
 
 static int waveform_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
-                              comedi_cmd *cmd);
+                              struct comedi_cmd *cmd);
 static int waveform_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
 static int waveform_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
 static int waveform_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
 {
        struct comedi_device *dev = (struct comedi_device *) arg;
        struct comedi_async *async = dev->read_subdev->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned int i, j;
        /* all times in microsec */
        unsigned long elapsed_time;
 }
 
 static int waveform_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
-                              comedi_cmd *cmd)
+                              struct comedi_cmd *cmd)
 {
        int err = 0;
        int tmp;
 
 static int waveform_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        if (cmd->flags & TRIG_RT) {
                comedi_error(dev,
 
 
 #if 0
 static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 
 static int contec_ns_to_timer(unsigned int *ns, int round);
 #endif
 
 #if 0
 static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        printk("contec_cmdtest called\n");
        return 0;
 
        comedi_insn * insn, unsigned int * data);
 
 static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int das16_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s);
 static int das16_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static void das16_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
        int flags);
 static int das1600_mode_detect(struct comedi_device * dev);
 static unsigned int das16_suggest_transfer_size(struct comedi_device * dev,
-       comedi_cmd cmd);
+       struct comedi_cmd cmd);
 
 static void reg_dump(struct comedi_device * dev);
 
 #define thisboard ((struct das16_board_struct *)(dev->board_ptr))
 
 static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0, tmp;
        int gain, start_chan, i;
 static int das16_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned int byte;
        unsigned long flags;
        int range;
        unsigned long dma_flags, spin_flags;
        struct comedi_subdevice *s = dev->read_subdev;
        struct comedi_async *async;
-       comedi_cmd *cmd;
+       struct comedi_cmd *cmd;
        int num_bytes, residue;
        int buffer_index;
 
 
 // utility function that suggests a dma transfer size in bytes
 static unsigned int das16_suggest_transfer_size(struct comedi_device * dev,
-       comedi_cmd cmd)
+       struct comedi_cmd cmd)
 {
        unsigned int size;
        unsigned int freq;
 
 
 I was _barely_ able to reach the full 1 MHz capability
 of this board, using a hard real-time interrupt
-(set the TRIG_RT flag in your comedi_cmd and use
+(set the TRIG_RT flag in your struct comedi_cmd and use
 rtlinux or RTAI).  The board can't do dma, so the bottleneck is
 pulling the data across the ISA bus.  I timed the interrupt
 handler, and it took my computer ~470 microseconds to pull 512
        comedi_insn * insn, unsigned int * data);
 
 static int das16m1_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s);
 static int das16m1_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 
 }
 
 static int das16m1_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        unsigned int err = 0, tmp, i;
 
 static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned int byte, i;
 
        if (dev->irq == 0) {
 {
        struct comedi_subdevice *s;
        struct comedi_async *async;
-       comedi_cmd *cmd;
+       struct comedi_cmd *cmd;
        u16 num_samples;
        u16 hw_counter;
 
 
 static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
        struct comedi_subdevice * s);
 static int das1800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int das1800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int das1800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
 
 static int das1800_set_frequency(struct comedi_device * dev);
 static unsigned int burst_convert_arg(unsigned int convert_arg, int round_mode);
-static unsigned int suggest_transfer_size(comedi_cmd * cmd);
+static unsigned int suggest_transfer_size(struct comedi_cmd * cmd);
 
 // analog input ranges
 static const struct comedi_lrange range_ai_das1801 = {
 {
        struct comedi_subdevice *s = dev->subdevices + 0;       /* analog input subdevice */
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned int status = inb(dev->iobase + DAS1800_STATUS);
 
        async->events = 0;
        unsigned int channel, uint16_t * buffer)
 {
        unsigned int num_bytes, num_samples;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        disable_dma(channel);
 
        struct comedi_subdevice * s)
 {
        int numPoints = 0;      /* number of points to read */
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        numPoints = FIFO_SIZE / 2;
        /* if we only need some of the points */
 {
        short dpnt;
        int unipolar;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        unipolar = inb(dev->iobase + DAS1800_CONTROL_C) & UB;
 
 
 /* test analog input cmd */
 static int das1800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 // first, some utility functions used in the main ai_do_cmd()
 
 // returns appropriate bits for control register a, depending on command
-static int control_a_bits(comedi_cmd cmd)
+static int control_a_bits(struct comedi_cmd cmd)
 {
        int control_a;
 
 }
 
 // returns appropriate bits for control register c, depending on command
-static int control_c_bits(comedi_cmd cmd)
+static int control_c_bits(struct comedi_cmd cmd)
 {
        int control_c;
        int aref;
 }
 
 // sets up counters
-static int setup_counters(struct comedi_device * dev, comedi_cmd cmd)
+static int setup_counters(struct comedi_device * dev, struct comedi_cmd cmd)
 {
        // setup cascaded counters for conversion/scan frequency
        switch (cmd.scan_begin_src) {
 }
 
 // sets up dma
-static void setup_dma(struct comedi_device * dev, comedi_cmd cmd)
+static void setup_dma(struct comedi_device * dev, struct comedi_cmd cmd)
 {
        unsigned long lock_flags;
        const int dual_dma = devpriv->irq_dma_bits & DMA_DUAL;
 }
 
 // programs channel/gain list into card
-static void program_chanlist(struct comedi_device * dev, comedi_cmd cmd)
+static void program_chanlist(struct comedi_device * dev, struct comedi_cmd cmd)
 {
        int i, n, chan_range;
        unsigned long irq_flags;
        int ret;
        int control_a, control_c;
        struct comedi_async *async = s->async;
-       comedi_cmd cmd = async->cmd;
+       struct comedi_cmd cmd = async->cmd;
 
        if (!dev->irq) {
                comedi_error(dev,
 }
 
 // utility function that suggests a dma transfer size based on the conversion period 'ns'
-static unsigned int suggest_transfer_size(comedi_cmd * cmd)
+static unsigned int suggest_transfer_size(struct comedi_cmd * cmd)
 {
        unsigned int size = DMA_BUF_SIZE;
        static const int sample_size = 2;       // size in bytes of one sample from board
 
 static void enable_das800(struct comedi_device * dev);
 static void disable_das800(struct comedi_device * dev);
 static int das800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int das800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int das800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
 }
 
 static int das800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 static int dmm32at_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
 static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int dmm32at_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int dmm32at_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static int dmm32at_ns_to_timer(unsigned int *ns, int round);
 }
 
 static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 static int dmm32at_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int i, range;
        unsigned char chanlo, chanhi, status;
 
 
        if (intstat & DMM32AT_ADINT) {
                struct comedi_subdevice *s = dev->read_subdev;
-               comedi_cmd *cmd = &s->async->cmd;
+               struct comedi_cmd *cmd = &s->async->cmd;
 
                for (i = 0; i < cmd->chanlist_len; i++) {
                        /* read data */
 
 }
 
 static int dt2814_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 static int dt2814_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int chan;
        int trigvar;
 
 
 }
 
 static int dt282x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 static int dt282x_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int timer;
 
        if (devpriv->usedma == 0) {
 }
 
 static int dt282x_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 static int dt282x_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        int timer;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        if (devpriv->usedma == 0) {
                comedi_error(dev,
 
 }
 
 static int dt3k_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 static int dt3k_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int i;
        unsigned int chan, range, aref;
        unsigned int divider;
 
 void abort_dma(struct comedi_device * dev, unsigned int channel);
 static int hpdi_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int hpdi_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int hpdi_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG);
 static int dio_config_block_size(struct comedi_device * dev, unsigned int * data);
 }
 
 static int di_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 }
 
 static int hpdi_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        if (priv(dev)->dio_config_output) {
                return -EINVAL;
        uint32_t bits;
        unsigned long flags;
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
 
        hpdi_writel(dev, RX_FIFO_RESET_BIT, BOARD_CONTROL_REG);
 
 
 static int me4000_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
 
 static int ai_check_chanlist(struct comedi_device *dev,
-       struct comedi_subdevice *s, comedi_cmd *cmd);
+       struct comedi_subdevice *s, struct comedi_cmd *cmd);
 
 static int ai_round_cmd_args(struct comedi_device *dev,
        struct comedi_subdevice *s,
-       comedi_cmd *cmd,
+       struct comedi_cmd *cmd,
        unsigned int *init_ticks,
        unsigned int *scan_ticks, unsigned int *chan_ticks);
 
 static int ai_prepare(struct comedi_device *dev,
        struct comedi_subdevice *s,
-       comedi_cmd *cmd,
+       struct comedi_cmd *cmd,
        unsigned int init_ticks,
        unsigned int scan_ticks, unsigned int chan_ticks);
 
 static int ai_write_chanlist(struct comedi_device *dev,
-       struct comedi_subdevice *s, comedi_cmd *cmd);
+       struct comedi_subdevice *s, struct comedi_cmd *cmd);
 
 static irqreturn_t me4000_ai_isr(int irq, void *dev_id PT_REGS_ARG);
 
 static int me4000_ai_do_cmd_test(struct comedi_device *dev,
-       struct comedi_subdevice *s, comedi_cmd *cmd);
+       struct comedi_subdevice *s, struct comedi_cmd *cmd);
 
 static int me4000_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
 
 }
 
 static int ai_check_chanlist(struct comedi_device *dev,
-       struct comedi_subdevice *s, comedi_cmd *cmd)
+       struct comedi_subdevice *s, struct comedi_cmd *cmd)
 {
        int aref;
        int i;
 
 static int ai_round_cmd_args(struct comedi_device *dev,
        struct comedi_subdevice *s,
-       comedi_cmd *cmd,
+       struct comedi_cmd *cmd,
        unsigned int *init_ticks,
        unsigned int *scan_ticks, unsigned int *chan_ticks)
 {
 
 static int ai_prepare(struct comedi_device *dev,
        struct comedi_subdevice *s,
-       comedi_cmd *cmd,
+       struct comedi_cmd *cmd,
        unsigned int init_ticks,
        unsigned int scan_ticks, unsigned int chan_ticks)
 {
 }
 
 static int ai_write_chanlist(struct comedi_device *dev,
-       struct comedi_subdevice *s, comedi_cmd *cmd)
+       struct comedi_subdevice *s, struct comedi_cmd *cmd)
 {
        unsigned int entry;
        unsigned int chan;
        unsigned int init_ticks = 0;
        unsigned int scan_ticks = 0;
        unsigned int chan_ticks = 0;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        CALL_PDEBUG("In me4000_ai_do_cmd()\n");
 
  * So I tried to adopt this scheme.
  */
 static int me4000_ai_do_cmd_test(struct comedi_device *dev,
-       struct comedi_subdevice *s, comedi_cmd *cmd)
+       struct comedi_subdevice *s, struct comedi_cmd *cmd)
 {
 
        unsigned int init_ticks;
 
 
 /* Test analog input command */
 static int me_ai_do_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s,
-                            comedi_cmd *cmd)
+                            struct comedi_cmd *cmd)
 {
        return 0;
 }
 
 }
 
 static int ni6527_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 static int ni6527_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       //comedi_cmd *cmd = &s->async->cmd;
+       //struct comedi_cmd *cmd = &s->async->cmd;
 
        writeb(ClrEdge | ClrOverflow,
                devpriv->mite->daq_io_addr + Clear_Register);
 
 }
 
 static int ni_65xx_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 static int ni_65xx_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       //comedi_cmd *cmd = &s->async->cmd;
+       //struct comedi_cmd *cmd = &s->async->cmd;
 
        writeb(ClrEdge | ClrOverflow,
                private(dev)->mite->daq_io_addr + Clear_Register);
 
        int retval;
 
        struct ni_gpct *counter = subdev_to_counter(s);
-//      const comedi_cmd *cmd = &s->async->cmd;
+//      const struct comedi_cmd *cmd = &s->async->cmd;
 
        retval = ni_660x_request_mite_channel(dev, counter, COMEDI_INPUT);
        if (retval) {
 }
 
 static int ni_660x_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        struct ni_gpct *counter = subdev_to_counter(s);
 
 
 
 static irqreturn_t a2150_interrupt(int irq, void *d PT_REGS_ARG);
 static int a2150_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int a2150_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int a2150_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
        struct comedi_device *dev = d;
        struct comedi_subdevice *s = dev->read_subdev;
        struct comedi_async *async;
-       comedi_cmd *cmd;
+       struct comedi_cmd *cmd;
        unsigned int max_points, num_points, residue, leftover;
        short dpnt;
        static const int sample_size = sizeof(devpriv->dma_buffer[0]);
 }
 
 static int a2150_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 static int a2150_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        unsigned long lock_flags;
        unsigned int old_config_bits = devpriv->config_bits;
        unsigned int trigger_bits;
 
 static int atmio16d_detach(struct comedi_device * dev);
 static irqreturn_t atmio16d_interrupt(int irq, void *d PT_REGS_ARG);
 static int atmio16d_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int atmio16d_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int atmio16d_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static void reset_counters(struct comedi_device * dev);
 }
 
 static int atmio16d_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0, tmp;
 #ifdef DEBUG1
 
 static int atmio16d_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned int timer, base_clock;
        unsigned int sample_count, tmp, chan, gain;
        int i;
 
 }
 
 static int subdev_700_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        unsigned int tmp;
 
 static void handle_isa_dma(struct comedi_device * dev);
 static void labpc_drain_dregs(struct comedi_device * dev);
 static int labpc_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int labpc_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int labpc_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
        comedi_insn * insn, unsigned int * data);
 static int labpc_eeprom_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
-static unsigned int labpc_suggest_transfer_size(comedi_cmd cmd);
-static void labpc_adc_timing(struct comedi_device * dev, comedi_cmd * cmd);
+static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd);
+static void labpc_adc_timing(struct comedi_device * dev, struct comedi_cmd * cmd);
 #ifdef CONFIG_COMEDI_PCI
 static int labpc_find_device(struct comedi_device *dev, int bus, int slot);
 #endif
        return 0;
 }
 
-static enum scan_mode labpc_ai_scan_mode(const comedi_cmd * cmd)
+static enum scan_mode labpc_ai_scan_mode(const struct comedi_cmd * cmd)
 {
        if (cmd->chanlist_len == 1)
                return MODE_SINGLE_CHAN;
 }
 
 static int labpc_ai_chanlist_invalid(const struct comedi_device * dev,
-       const comedi_cmd * cmd)
+       const struct comedi_cmd * cmd)
 {
        int mode, channel, range, aref, i;
 
        return 0;
 }
 
-static int labpc_use_continuous_mode(const comedi_cmd * cmd)
+static int labpc_use_continuous_mode(const struct comedi_cmd * cmd)
 {
        if (labpc_ai_scan_mode(cmd) == MODE_SINGLE_CHAN)
                return 1;
        return 0;
 }
 
-static unsigned int labpc_ai_convert_period(const comedi_cmd * cmd)
+static unsigned int labpc_ai_convert_period(const struct comedi_cmd * cmd)
 {
        if (cmd->convert_src != TRIG_TIMER)
                return 0;
        return cmd->convert_arg;
 }
 
-static void labpc_set_ai_convert_period(comedi_cmd * cmd, unsigned int ns)
+static void labpc_set_ai_convert_period(struct comedi_cmd * cmd, unsigned int ns)
 {
        if (cmd->convert_src != TRIG_TIMER)
                return;
                cmd->convert_arg = ns;
 }
 
-static unsigned int labpc_ai_scan_period(const comedi_cmd * cmd)
+static unsigned int labpc_ai_scan_period(const struct comedi_cmd * cmd)
 {
        if (cmd->scan_begin_src != TRIG_TIMER)
                return 0;
        return cmd->scan_begin_arg;
 }
 
-static void labpc_set_ai_scan_period(comedi_cmd * cmd, unsigned int ns)
+static void labpc_set_ai_scan_period(struct comedi_cmd * cmd, unsigned int ns)
 {
        if (cmd->scan_begin_src != TRIG_TIMER)
                return;
 }
 
 static int labpc_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp, tmp2;
        unsigned long irq_flags;
        int ret;
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        enum transfer_type xfer;
        unsigned long flags;
 
        struct comedi_device *dev = d;
        struct comedi_subdevice *s = dev->read_subdev;
        struct comedi_async *async;
-       comedi_cmd *cmd;
+       struct comedi_cmd *cmd;
 
        if (dev->attached == 0) {
                comedi_error(dev, "premature interrupt");
 }
 
 // utility function that suggests a dma transfer size in bytes
-static unsigned int labpc_suggest_transfer_size(comedi_cmd cmd)
+static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd)
 {
        unsigned int size;
        unsigned int freq;
 }
 
 // figures out what counter values to use based on command
-static void labpc_adc_timing(struct comedi_device * dev, comedi_cmd * cmd)
+static void labpc_adc_timing(struct comedi_device * dev, struct comedi_cmd * cmd)
 {
        const int max_counter_value = 0x10000;  // max value for 16 bit counter in mode 2
        const int min_counter_value = 2;        // min value for 16 bit counter in mode 2
 
 static int ni_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
 static int ni_cdio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int ni_cdio_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int ni_cdio_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static void handle_cdio_interrupt(struct comedi_device * dev);
        comedi_insn * insn, unsigned int * data);
 static int ni_gpct_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int ni_gpct_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int ni_gpct_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static void handle_gpct_interrupt(struct comedi_device * dev,
        unsigned short counter_index);
 static void ni_ao_fifo_load(struct comedi_device * dev, struct comedi_subdevice * s, int n)
 {
        struct comedi_async *async = s->async;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        int chan;
        int i;
        short d;
 }
 
 static int ni_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 static int ni_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       const comedi_cmd *cmd = &s->async->cmd;
+       const struct comedi_cmd *cmd = &s->async->cmd;
        int timer;
        int mode1 = 0;          /* mode1 is needed for both stop and convert */
        int mode2 = 0;
 
 static int ni_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       const comedi_cmd *cmd = &s->async->cmd;
+       const struct comedi_cmd *cmd = &s->async->cmd;
        int bits;
        int i;
        unsigned trigvar;
 }
 
 static int ni_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 }
 
 static int ni_cdio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 static int ni_cdio_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       const comedi_cmd *cmd = &s->async->cmd;
+       const struct comedi_cmd *cmd = &s->async->cmd;
        unsigned cdo_mode_bits = CDO_FIFO_Mode_Bit | CDO_Halt_On_Error_Bit;
        int retval;
 
        int retval;
 #ifdef PCIDMA
        struct ni_gpct *counter = s->private;
-//      const comedi_cmd *cmd = &s->async->cmd;
+//      const struct comedi_cmd *cmd = &s->async->cmd;
 
        retval = ni_request_gpct_mite_channel(dev, counter->counter_index,
                COMEDI_INPUT);
 }
 
 static int ni_gpct_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
 #ifdef PCIDMA
        struct ni_gpct *counter = s->private;
 
 #define devpriv ((nidio96_private *)dev->private)
 
 static int ni_pcidio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int ni_pcidio_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int ni_pcidio_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
        unsigned int trignum);
 }
 
 static int ni_pcidio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 static int ni_pcidio_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        /* XXX configure ports for input */
        writel(0x0000, devpriv->mite->daq_io_addr + Port_Pin_Directions(0));
 
 extern int ni_tio_winsn(struct ni_gpct *counter,
        comedi_insn * insn, unsigned int * data);
 extern int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async);
-extern int ni_tio_cmdtest(struct ni_gpct *counter, comedi_cmd * cmd);
+extern int ni_tio_cmdtest(struct ni_gpct *counter, struct comedi_cmd * cmd);
 extern int ni_tio_cancel(struct ni_gpct *counter);
 extern void ni_tio_handle_interrupt(struct ni_gpct *counter,
        struct comedi_subdevice * s);
 
 static int ni_tio_input_cmd(struct ni_gpct *counter, struct comedi_async *async)
 {
        struct ni_gpct_device *counter_dev = counter->counter_dev;
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        int retval = 0;
 
        /* write alloc the entire buffer */
 
 static int ni_tio_cmd_setup(struct ni_gpct *counter, struct comedi_async *async)
 {
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        int set_gate_source = 0;
        unsigned gate_source;
        int retval = 0;
 
 int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async)
 {
-       comedi_cmd *cmd = &async->cmd;
+       struct comedi_cmd *cmd = &async->cmd;
        int retval = 0;
        unsigned long flags;
 
        return retval;
 }
 
-int ni_tio_cmdtest(struct ni_gpct *counter, comedi_cmd * cmd)
+int ni_tio_cmdtest(struct ni_gpct *counter, struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 }
 
 static int pcl711_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int tmp;
        int err = 0;
 static int pcl711_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        int timer1, timer2;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        pcl711_set_changain(dev, cmd->chanlist[0]);
 
 
 /*
 ==============================================================================
 */
-static void pcl812_cmdtest_out(int e, comedi_cmd * cmd)
+static void pcl812_cmdtest_out(int e, struct comedi_cmd * cmd)
 {
        rt_printk("pcl812 e=%d startsrc=%x scansrc=%x convsrc=%x\n", e,
                cmd->start_src, cmd->scan_begin_src, cmd->convert_src);
 ==============================================================================
 */
 static int pcl812_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp, divisor1, divisor2;
 static int pcl812_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        unsigned int divisor1 = 0, divisor2 = 0, i, dma_flags, bytes;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
 #ifdef PCL812_EXTDEBUG
        rt_printk("pcl812 EDBG: BGN: pcl812_ai_cmd(...)\n");
 
 #endif
 
 static int pcl816_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int pcl816_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 
 /*
 ==============================================================================
    COMMAND MODE
 */
-static void pcl816_cmdtest_out(int e, comedi_cmd * cmd)
+static void pcl816_cmdtest_out(int e, struct comedi_cmd * cmd)
 {
        rt_printk("pcl816 e=%d startsrc=%x scansrc=%x convsrc=%x\n", e,
                cmd->start_src, cmd->scan_begin_src, cmd->convert_src);
 ==============================================================================
 */
 static int pcl816_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp, divisor1, divisor2;
 static int pcl816_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        unsigned int divisor1 = 0, divisor2 = 0, dma_flags, bytes, dmairq;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
 
        if (cmd->start_src != TRIG_NOW)
                return -EINVAL;
 
 static int pcl818_ai_cmd_mode(int mode, struct comedi_device * dev,
        struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int divisor1, divisor2;
        unsigned int seglen;
 
 ==============================================================================
 */
 static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp, divisor1, divisor2;
 */
 static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int retval;
 
        rt_printk("pcl818_ai_cmd()\n");
 
 static int pcmmio_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static int pcmmio_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int pcmmio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 
 /* some helper functions to deal with specifics of this device's registers */
 static void init_asics(struct comedi_device * dev);    /* sets up/clears ASIC chips to defaults */
        } else {
                unsigned bits = 0, pol_bits = 0, n;
                int nports, firstport, asic, port;
-               comedi_cmd *cmd = &s->async->cmd;
+               struct comedi_cmd *cmd = &s->async->cmd;
 
                if ((asic = subpriv->dio.intr.asic) < 0)
                        return 1;       /* not an interrupt
  */
 static int pcmmio_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned long flags;
        int event = 0;
 
  * 'do_cmdtest' function for an 'INTERRUPT' subdevice.
  */
 static int
-pcmmio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comedi_cmd * cmd)
+pcmmio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, struct comedi_cmd * cmd)
 {
        int err = 0;
        unsigned int tmp;
 
 static int pcmuio_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
 static int pcmuio_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
 static int pcmuio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 
 /* some helper functions to deal with specifics of this device's registers */
 static void init_asics(struct comedi_device * dev);    /* sets up/clears ASIC chips to defaults */
        } else {
                unsigned bits = 0, pol_bits = 0, n;
                int nports, firstport, asic, port;
-               comedi_cmd *cmd = &s->async->cmd;
+               struct comedi_cmd *cmd = &s->async->cmd;
 
                if ((asic = subpriv->intr.asic) < 0)
                        return 1;       /* not an interrupt
  */
 static int pcmuio_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned long flags;
        int event = 0;
 
  * 'do_cmdtest' function for an 'INTERRUPT' subdevice.
  */
 static int
-pcmuio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comedi_cmd * cmd)
+pcmuio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, struct comedi_cmd * cmd)
 {
        int err = 0;
        unsigned int tmp;
 
  */
 
 static int daqp_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 static int daqp_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
 {
        local_info_t *local = (local_info_t *) s->private;
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int counter = 100;
        int scanlist_start_on_every_entry;
        int threshold;
 
 static int rtd_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
        comedi_insn *insn, unsigned int *data);
 static int rtd_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
-       comedi_cmd *cmd);
+       struct comedi_cmd *cmd);
 static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
 static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
 /* static int rtd_ai_poll (struct comedi_device *dev,struct comedi_subdevice *s); */
 */
 
 static int rtd_ai_cmdtest(struct comedi_device *dev,
-       struct comedi_subdevice *s, comedi_cmd *cmd)
+       struct comedi_subdevice *s, struct comedi_cmd *cmd)
 {
        int err = 0;
        int tmp;
 */
 static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        int timer;
 
        /* stop anything currently running */
 
        comedi_insn *insn, unsigned int *data);
 static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
 static int s626_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
-       comedi_cmd *cmd);
+       struct comedi_cmd *cmd);
 static int s626_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
 static int s626_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
        comedi_insn *insn, unsigned int *data);
 static int s626_enc_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
        comedi_insn *insn, unsigned int *data);
 static int s626_ns_to_timer(int *nanosec, int round_mode);
-static int s626_ai_load_polllist(uint8_t *ppl, comedi_cmd *cmd);
+static int s626_ai_load_polllist(uint8_t *ppl, struct comedi_cmd *cmd);
 static int s626_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
        unsigned int trignum);
 static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG);
 {
        struct comedi_device *dev = d;
        struct comedi_subdevice *s;
-       comedi_cmd *cmd;
+       struct comedi_cmd *cmd;
        struct enc_private *k;
        unsigned long flags;
        int32_t *readaddr;
        uint16_t i;
        uint16_t n;
        uint32_t LocalPPL;
-       comedi_cmd *cmd = &(dev->subdevices->async->cmd);
+       struct comedi_cmd *cmd = &(dev->subdevices->async->cmd);
 
        /*  Stop RPS program in case it is currently running. */
        MC_DISABLE(P_MC1, MC1_ERPS1);
        return n;
 }
 
-static int s626_ai_load_polllist(uint8_t *ppl, comedi_cmd *cmd)
+static int s626_ai_load_polllist(uint8_t *ppl, struct comedi_cmd *cmd)
 {
 
        int n;
 {
 
        uint8_t ppl[16];
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        struct enc_private *k;
        int tick;
 
 }
 
 static int s626_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
-       comedi_cmd *cmd)
+       struct comedi_cmd *cmd)
 {
        int err = 0;
        int tmp;
 
 static int skel_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
        comedi_insn * insn, unsigned int * data);
 static int skel_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd);
+       struct comedi_cmd * cmd);
 static int skel_ns_to_timer(unsigned int *ns, int round);
 
 /*
 }
 
 static int skel_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
-       comedi_cmd * cmd)
+       struct comedi_cmd * cmd)
 {
        int err = 0;
        int tmp;
 
 }
 
 static int usbdux_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
-                            comedi_cmd *cmd)
+                            struct comedi_cmd *cmd)
 {
        int err = 0, tmp, i;
        unsigned int tmpTimer;
 
 static int usbdux_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned int chan, range;
        int i, ret;
        struct usbduxsub *this_usbduxsub = dev->private;
 }
 
 static int usbdux_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
-                            comedi_cmd *cmd)
+                            struct comedi_cmd *cmd)
 {
        int err = 0, tmp;
        struct usbduxsub *this_usbduxsub = dev->private;
 
 static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned int chan, gain;
        int i, ret;
        struct usbduxsub *this_usbduxsub = dev->private;
 
 }
 
 static int usbduxfast_ai_cmdtest(struct comedi_device *dev,
-       struct comedi_subdevice *s, comedi_cmd *cmd)
+       struct comedi_subdevice *s, struct comedi_cmd *cmd)
 {
        int err = 0, stop_mask = 0;
        long int steps, tmp;
 
 static int usbduxfast_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
-       comedi_cmd *cmd = &s->async->cmd;
+       struct comedi_cmd *cmd = &s->async->cmd;
        unsigned int chan, gain, rngmask = 0xff;
        int i, j, ret;
        struct usbduxfastsub_s *udfs;
 
        return dev->minor;
 }
 
-int comedi_command(void *d, comedi_cmd *cmd)
+int comedi_command(void *d, struct comedi_cmd *cmd)
 {
        struct comedi_device *dev = (struct comedi_device *) d;
        struct comedi_subdevice *s;
        return s->do_cmd(dev, s);
 }
 
-int comedi_command_test(void *d, comedi_cmd *cmd)
+int comedi_command_test(void *d, struct comedi_cmd *cmd)
 {
        struct comedi_device *dev = (struct comedi_device *) d;
        struct comedi_subdevice *s;