Use `struct comedi_kcmd` instead of `struct comedi_cmd`. Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx> --- drivers/staging/comedi/drivers/ni_labpc.c | 33 +++++++++++++++++-------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_labpc.c b/drivers/staging/comedi/drivers/ni_labpc.c index 295ddbb..11674a6 100644 --- a/drivers/staging/comedi/drivers/ni_labpc.c +++ b/drivers/staging/comedi/drivers/ni_labpc.c @@ -215,7 +215,8 @@ static void handle_isa_dma(struct comedi_device *dev); #endif static void labpc_drain_dregs(struct comedi_device *dev); static int labpc_ai_cmdtest(struct comedi_device *dev, - struct comedi_subdevice *s, struct comedi_cmd *cmd); + struct comedi_subdevice *s, + struct comedi_kcmd *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, struct comedi_insn *insn, unsigned int *data); @@ -236,9 +237,10 @@ static int labpc_eeprom_write_insn(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data); -static void labpc_adc_timing(struct comedi_device *dev, struct comedi_cmd *cmd); +static void labpc_adc_timing(struct comedi_device *dev, + struct comedi_kcmd *cmd); #ifdef CONFIG_ISA_DMA_API -static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd); +static unsigned int labpc_suggest_transfer_size(struct comedi_kcmd cmd); #endif static int labpc_dio_mem_callback(int dir, int port, int data, unsigned long arg); @@ -816,7 +818,7 @@ static int labpc_cancel(struct comedi_device *dev, struct comedi_subdevice *s) return 0; } -static enum scan_mode labpc_ai_scan_mode(const struct comedi_cmd *cmd) +static enum scan_mode labpc_ai_scan_mode(const struct comedi_kcmd *cmd) { if (cmd->chanlist_len == 1) return MODE_SINGLE_CHAN; @@ -839,7 +841,7 @@ static enum scan_mode labpc_ai_scan_mode(const struct comedi_cmd *cmd) } static int labpc_ai_chanlist_invalid(const struct comedi_device *dev, - const struct comedi_cmd *cmd) + const struct comedi_kcmd *cmd) { int mode, channel, range, aref, i; @@ -911,7 +913,7 @@ static int labpc_ai_chanlist_invalid(const struct comedi_device *dev, return 0; } -static int labpc_use_continuous_mode(const struct comedi_cmd *cmd) +static int labpc_use_continuous_mode(const struct comedi_kcmd *cmd) { if (labpc_ai_scan_mode(cmd) == MODE_SINGLE_CHAN) return 1; @@ -922,7 +924,7 @@ static int labpc_use_continuous_mode(const struct comedi_cmd *cmd) return 0; } -static unsigned int labpc_ai_convert_period(const struct comedi_cmd *cmd) +static unsigned int labpc_ai_convert_period(const struct comedi_kcmd *cmd) { if (cmd->convert_src != TRIG_TIMER) return 0; @@ -934,7 +936,8 @@ static unsigned int labpc_ai_convert_period(const struct comedi_cmd *cmd) return cmd->convert_arg; } -static void labpc_set_ai_convert_period(struct comedi_cmd *cmd, unsigned int ns) +static void labpc_set_ai_convert_period(struct comedi_kcmd *cmd, + unsigned int ns) { if (cmd->convert_src != TRIG_TIMER) return; @@ -948,7 +951,7 @@ static void labpc_set_ai_convert_period(struct comedi_cmd *cmd, unsigned int ns) cmd->convert_arg = ns; } -static unsigned int labpc_ai_scan_period(const struct comedi_cmd *cmd) +static unsigned int labpc_ai_scan_period(const struct comedi_kcmd *cmd) { if (cmd->scan_begin_src != TRIG_TIMER) return 0; @@ -960,7 +963,7 @@ static unsigned int labpc_ai_scan_period(const struct comedi_cmd *cmd) return cmd->scan_begin_arg; } -static void labpc_set_ai_scan_period(struct comedi_cmd *cmd, unsigned int ns) +static void labpc_set_ai_scan_period(struct comedi_kcmd *cmd, unsigned int ns) { if (cmd->scan_begin_src != TRIG_TIMER) return; @@ -973,7 +976,7 @@ static void labpc_set_ai_scan_period(struct comedi_cmd *cmd, unsigned int ns) } static int labpc_ai_cmdtest(struct comedi_device *dev, - struct comedi_subdevice *s, struct comedi_cmd *cmd) + struct comedi_subdevice *s, struct comedi_kcmd *cmd) { int err = 0; int tmp, tmp2; @@ -1120,7 +1123,7 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) #endif int ret; struct comedi_async *async = s->async; - struct comedi_cmd *cmd = &async->cmd; + struct comedi_kcmd *cmd = &async->cmd; enum transfer_type xfer; unsigned long flags; @@ -1382,7 +1385,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d) struct comedi_device *dev = d; struct comedi_subdevice *s = dev->read_subdev; struct comedi_async *async; - struct comedi_cmd *cmd; + struct comedi_kcmd *cmd; if (dev->attached == 0) { comedi_error(dev, "premature interrupt"); @@ -1766,7 +1769,7 @@ static int labpc_eeprom_write_insn(struct comedi_device *dev, #ifdef CONFIG_ISA_DMA_API /* utility function that suggests a dma transfer size in bytes */ -static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd) +static unsigned int labpc_suggest_transfer_size(struct comedi_kcmd cmd) { unsigned int size; unsigned int freq; @@ -1791,7 +1794,7 @@ static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd) #endif /* figures out what counter values to use based on command */ -static void labpc_adc_timing(struct comedi_device *dev, struct comedi_cmd *cmd) +static void labpc_adc_timing(struct comedi_device *dev, struct comedi_kcmd *cmd) { /* max value for 16 bit counter in mode 2 */ const int max_counter_value = 0x10000; -- 1.7.12 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel