Staging: comedi: Remove comedi_cmd typedef

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Bill Pemberton 2009-03-16 22:05:47 -04:00 коммит произвёл Greg Kroah-Hartman
Родитель b50d88d080
Коммит ea6d0d4cab
61 изменённых файлов: 277 добавлений и 278 удалений

Просмотреть файл

@ -300,8 +300,8 @@ enum comedi_support_level {
#define COMEDI_UNLOCK _IO(CIO, 6) #define COMEDI_UNLOCK _IO(CIO, 6)
#define COMEDI_CANCEL _IO(CIO, 7) #define COMEDI_CANCEL _IO(CIO, 7)
#define COMEDI_RANGEINFO _IOR(CIO, 8, comedi_rangeinfo) #define COMEDI_RANGEINFO _IOR(CIO, 8, comedi_rangeinfo)
#define COMEDI_CMD _IOR(CIO, 9, comedi_cmd) #define COMEDI_CMD _IOR(CIO, 9, struct comedi_cmd)
#define COMEDI_CMDTEST _IOR(CIO, 10, comedi_cmd) #define COMEDI_CMDTEST _IOR(CIO, 10, struct comedi_cmd)
#define COMEDI_INSNLIST _IOR(CIO, 11, comedi_insnlist) #define COMEDI_INSNLIST _IOR(CIO, 11, comedi_insnlist)
#define COMEDI_INSN _IOR(CIO, 12, comedi_insn) #define COMEDI_INSN _IOR(CIO, 12, comedi_insn)
#define COMEDI_BUFCONFIG _IOR(CIO, 13, comedi_bufconfig) #define COMEDI_BUFCONFIG _IOR(CIO, 13, comedi_bufconfig)
@ -310,7 +310,6 @@ enum comedi_support_level {
/* structures */ /* structures */
typedef struct comedi_cmd_struct comedi_cmd;
typedef struct comedi_insn_struct comedi_insn; typedef struct comedi_insn_struct comedi_insn;
typedef struct comedi_insnlist_struct comedi_insnlist; typedef struct comedi_insnlist_struct comedi_insnlist;
typedef struct comedi_chaninfo_struct comedi_chaninfo; typedef struct comedi_chaninfo_struct comedi_chaninfo;
@ -351,7 +350,7 @@ struct comedi_insnlist_struct {
comedi_insn *insns; comedi_insn *insns;
}; };
struct comedi_cmd_struct { struct comedi_cmd {
unsigned int subdev; unsigned int subdev;
unsigned int flags; unsigned int flags;

Просмотреть файл

@ -188,7 +188,7 @@ static int compat_rangeinfo(struct file *file, unsigned long arg)
} }
/* Copy 32-bit cmd structure to native cmd structure. */ /* 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) struct comedi32_cmd_struct __user *cmd32)
{ {
int err; int err;
@ -239,7 +239,7 @@ static int get_compat_cmd(comedi_cmd __user *cmd,
} }
/* Copy native cmd structure to 32-bit cmd structure. */ /* 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; int err;
unsigned int temp; unsigned int temp;
@ -289,7 +289,7 @@ static int put_compat_cmd(struct comedi32_cmd_struct __user *cmd32, comedi_cmd _
/* Handle 32-bit COMEDI_CMD ioctl. */ /* Handle 32-bit COMEDI_CMD ioctl. */
static int compat_cmd(struct file *file, unsigned long arg) 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; struct comedi32_cmd_struct __user *cmd32;
int rc; int rc;
@ -306,7 +306,7 @@ static int compat_cmd(struct file *file, unsigned long arg)
/* Handle 32-bit COMEDI_CMDTEST ioctl. */ /* Handle 32-bit COMEDI_CMDTEST ioctl. */
static int compat_cmdtest(struct file *file, unsigned long arg) 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; struct comedi32_cmd_struct __user *cmd32;
int rc, err; int rc, err;

Просмотреть файл

@ -977,13 +977,13 @@ error:
*/ */
static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file) 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_subdevice *s;
struct comedi_async *async; struct comedi_async *async;
int ret = 0; int ret = 0;
unsigned int *chanlist_saver = 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"); DPRINTK("bad cmd address\n");
return -EFAULT; return -EFAULT;
} }
@ -1072,7 +1072,7 @@ static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file)
/* restore chanlist pointer before copying back */ /* restore chanlist pointer before copying back */
user_cmd.chanlist = chanlist_saver; user_cmd.chanlist = chanlist_saver;
user_cmd.data = NULL; 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"); DPRINTK("fault writing cmd\n");
ret = -EFAULT; ret = -EFAULT;
goto cleanup; goto cleanup;
@ -1131,13 +1131,13 @@ cleanup:
*/ */
static int do_cmdtest_ioctl(struct comedi_device *dev, void *arg, void *file) 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; struct comedi_subdevice *s;
int ret = 0; int ret = 0;
unsigned int *chanlist = NULL; unsigned int *chanlist = NULL;
unsigned int *chanlist_saver = 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"); DPRINTK("bad cmd address\n");
return -EFAULT; return -EFAULT;
} }
@ -1201,7 +1201,7 @@ static int do_cmdtest_ioctl(struct comedi_device *dev, void *arg, void *file)
/* restore chanlist pointer before copying back */ /* restore chanlist pointer before copying back */
user_cmd.chanlist = chanlist_saver; 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"); DPRINTK("bad cmd address\n");
ret = -EFAULT; ret = -EFAULT;
goto cleanup; goto cleanup;

Просмотреть файл

@ -165,7 +165,7 @@ struct comedi_subdevice {
unsigned int *); unsigned int *);
int (*do_cmd) (struct comedi_device *, struct comedi_subdevice *); 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 (*poll) (struct comedi_device *, struct comedi_subdevice *);
int (*cancel) (struct comedi_device *, struct comedi_subdevice *); int (*cancel) (struct comedi_device *, struct comedi_subdevice *);
/* int (*do_lock)(struct comedi_device *,struct comedi_subdevice *); */ /* int (*do_lock)(struct comedi_device *,struct comedi_subdevice *); */
@ -221,7 +221,7 @@ struct comedi_async {
unsigned int events; /* events that have occurred */ unsigned int events; /* events that have occurred */
comedi_cmd cmd; struct comedi_cmd cmd;
wait_queue_head_t wait_head; wait_queue_head_t wait_head;

Просмотреть файл

@ -60,8 +60,8 @@ int comedi_cancel(void *dev, unsigned int subdev);
int comedi_register_callback(void *dev, unsigned int subdev, int comedi_register_callback(void *dev, unsigned int subdev,
unsigned int mask, int (*cb) (unsigned int, void *), void *arg); unsigned int mask, int (*cb) (unsigned int, void *), void *arg);
int comedi_command(void *dev, comedi_cmd *cmd); int comedi_command(void *dev, struct comedi_cmd *cmd);
int comedi_command_test(void *dev, 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_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_data_write(void *dev, unsigned int subdev, unsigned int chan,
@ -137,8 +137,8 @@ int comedi_cancel(unsigned int minor, unsigned int subdev);
int comedi_register_callback(unsigned int minor, unsigned int subdev, int comedi_register_callback(unsigned int minor, unsigned int subdev,
unsigned int mask, int (*cb) (unsigned int, void *), void *arg); unsigned int mask, int (*cb) (unsigned int, void *), void *arg);
int comedi_command(unsigned int minor, comedi_cmd *cmd); int comedi_command(unsigned int minor, struct comedi_cmd *cmd);
int comedi_command_test(unsigned int minor, 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_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, int comedi_data_write(unsigned int dev, unsigned int subdev, unsigned int chan,

Просмотреть файл

@ -223,7 +223,7 @@ static void do_config(struct comedi_device *dev, struct comedi_subdevice * s)
} }
static int subdev_8255_cmdtest(struct comedi_device *dev, struct comedi_subdevice * s, static int subdev_8255_cmdtest(struct comedi_device *dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
unsigned int tmp; unsigned int tmp;

Просмотреть файл

@ -135,7 +135,7 @@ typedef struct {
unsigned int *data); unsigned int *data);
int (*i_hwdrv_CommandTestAnalogInput)(struct comedi_device *dev, int (*i_hwdrv_CommandTestAnalogInput)(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
comedi_cmd *cmd); struct comedi_cmd *cmd);
int (*i_hwdrv_CommandAnalogInput)(struct comedi_device *dev, int (*i_hwdrv_CommandAnalogInput)(struct comedi_device *dev,
struct comedi_subdevice *s); struct comedi_subdevice *s);
int (*i_hwdrv_CancelAnalogInput)(struct comedi_device *dev, int (*i_hwdrv_CancelAnalogInput)(struct comedi_device *dev,

Просмотреть файл

@ -460,7 +460,7 @@ int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_s
/* /*
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
| Function name :int i_APCI3120_CommandTestAnalogInput(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 | | Task : Test validity for a command for cyclic anlog input |
@ -469,7 +469,7 @@ int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_s
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev | | Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s | | struct comedi_subdevice *s |
| comedi_cmd *cmd | | struct comedi_cmd *cmd |
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
| Return Value :0 | | Return Value :0 |
| | | |
@ -477,7 +477,7 @@ int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_s
*/ */
int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s, int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; // divisor1,divisor2; int tmp; // divisor1,divisor2;
@ -635,7 +635,7 @@ int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_
int i_APCI3120_CommandAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s) 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 //loading private structure with cmd structure inputs
devpriv->ui_AiFlags = cmd->flags; devpriv->ui_AiFlags = cmd->flags;

Просмотреть файл

@ -235,7 +235,7 @@ int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev, struct comedi_su
int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s, int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data); comedi_insn *insn, unsigned int *data);
int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s, 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_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
//int i_APCI3120_CancelAnalogInput(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); int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s);

Просмотреть файл

@ -2539,7 +2539,7 @@ INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device * dev,
/* /*
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
| Function name :int i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev| | 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 | | Task : Test validity for a command for cyclic anlog input |
@ -2548,7 +2548,7 @@ INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device * dev,
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
| Input Parameters : struct comedi_device *dev | | Input Parameters : struct comedi_device *dev |
| struct comedi_subdevice *s | | struct comedi_subdevice *s |
| comedi_cmd *cmd | | struct comedi_cmd *cmd |
| | | |
| |
| | | |
@ -2561,7 +2561,7 @@ INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device * dev,
*/ */
int i_APCI3200_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s, int i_APCI3200_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
@ -2816,7 +2816,7 @@ int i_APCI3200_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_s
int i_APCI3200_CommandAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s) 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; UINT ui_Configuration = 0;
//INT i_CurrentSource = 0; //INT i_CurrentSource = 0;
UINT ui_Trigger = 0; UINT ui_Trigger = 0;

Просмотреть файл

@ -167,7 +167,7 @@ INT i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device *dev,
INT i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s); INT i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s);
INT i_APCI3200_InterruptHandleEos(struct comedi_device *dev); INT i_APCI3200_InterruptHandleEos(struct comedi_device *dev);
INT i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s, 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_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
INT i_APCI3200_ReadDigitalInput(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); comedi_insn *insn, unsigned int *data);

Просмотреть файл

@ -558,7 +558,7 @@ static int pci9111_ai_cancel(struct comedi_device * dev, struct comedi_subdevice
static int static int
pci9111_ai_do_cmd_test(struct comedi_device * dev, 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 tmp;
int error = 0; int error = 0;
@ -760,7 +760,7 @@ pci9111_ai_do_cmd_test(struct comedi_device * dev,
static int pci9111_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * subdevice) 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) { if (!dev->irq) {
comedi_error(dev, comedi_error(dev,

Просмотреть файл

@ -752,7 +752,7 @@ static int pci9118_ai_inttrig(struct comedi_device * dev, struct comedi_subdevic
============================================================================== ==============================================================================
*/ */
static int pci9118_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int pci9118_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp, divisor1, divisor2; int tmp, divisor1, divisor2;
@ -1289,7 +1289,7 @@ static int pci9118_ai_docmd_dma(struct comedi_device * dev, struct comedi_subdev
*/ */
static int pci9118_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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; unsigned int addchans = 0;
int ret = 0; int ret = 0;

Просмотреть файл

@ -884,7 +884,7 @@ static int pci171x_ai_docmd_and_mode(int mode, struct comedi_device * dev,
/* /*
============================================================================== ==============================================================================
*/ */
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, rt_printk("adv_pci1710 e=%d startsrc=%x scansrc=%x convsrc=%x\n", e,
cmd->start_src, cmd->scan_begin_src, cmd->convert_src); cmd->start_src, cmd->scan_begin_src, cmd->convert_src);
@ -901,7 +901,7 @@ static void pci171x_cmdtest_out(int e, comedi_cmd * cmd)
============================================================================== ==============================================================================
*/ */
static int pci171x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int pci171x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp, divisor1, divisor2; int tmp, divisor1, divisor2;
@ -1067,7 +1067,7 @@ static int pci171x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevic
*/ */
static int pci171x_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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"); DPRINTK("adv_pci1710 EDBG: BGN: pci171x_ai_cmd(...)\n");
devpriv->ai_n_chan = cmd->chanlist_len; devpriv->ai_n_chan = cmd->chanlist_len;

Просмотреть файл

@ -610,7 +610,7 @@ static int dio200_start_intr(struct comedi_device * dev, struct comedi_subdevice
unsigned int n; unsigned int n;
unsigned isn_bits; unsigned isn_bits;
dio200_subdev_intr *subpriv = s->private; dio200_subdev_intr *subpriv = s->private;
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
int retval = 0; int retval = 0;
if (!subpriv->continuous && subpriv->stopcount == 0) { if (!subpriv->continuous && subpriv->stopcount == 0) {
@ -802,7 +802,7 @@ static int dio200_subdev_intr_cancel(struct comedi_device * dev, struct comedi_s
*/ */
static int static int
dio200_subdev_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, dio200_subdev_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
unsigned int tmp; unsigned int tmp;
@ -909,7 +909,7 @@ dio200_subdev_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice *
*/ */
static int dio200_subdev_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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; dio200_subdev_intr *subpriv = s->private;
unsigned long flags; unsigned long flags;
int event = 0; int event = 0;

Просмотреть файл

@ -191,7 +191,7 @@ static int pc236_intr_check(struct comedi_device * dev);
static int pc236_intr_insn(struct comedi_device * dev, struct comedi_subdevice * s, static int pc236_intr_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int pc236_intr_cancel(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); static irqreturn_t pc236_interrupt(int irq, void *d PT_REGS_ARG);
@ -540,7 +540,7 @@ static int pc236_intr_insn(struct comedi_device * dev, struct comedi_subdevice *
* Copied from the comedi_parport driver. * Copied from the comedi_parport driver.
*/ */
static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;

Просмотреть файл

@ -574,7 +574,7 @@ static void pci224_ao_stop(struct comedi_device * dev, struct comedi_subdevice *
*/ */
static void pci224_ao_start(struct comedi_device * dev, struct comedi_subdevice * s) 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; unsigned long flags;
set_bit(AO_CMD_STARTED, &devpriv->state); set_bit(AO_CMD_STARTED, &devpriv->state);
@ -601,7 +601,7 @@ static void pci224_ao_start(struct comedi_device * dev, struct comedi_subdevice
*/ */
static void pci224_ao_handle_fifo(struct comedi_device * dev, struct comedi_subdevice * s) 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 num_scans;
unsigned int room; unsigned int room;
unsigned short dacstat; unsigned short dacstat;
@ -748,7 +748,7 @@ pci224_ao_inttrig_start(struct comedi_device * dev, struct comedi_subdevice * s,
* 'do_cmdtest' function for AO subdevice. * 'do_cmdtest' function for AO subdevice.
*/ */
static int 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; int err = 0;
unsigned int tmp; unsigned int tmp;
@ -1017,7 +1017,7 @@ pci224_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comed
*/ */
static int pci224_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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; int range;
unsigned int i, j; unsigned int i, j;
unsigned int ch; unsigned int ch;
@ -1216,7 +1216,7 @@ static irqreturn_t pci224_interrupt(int irq, void *d PT_REGS_ARG)
{ {
struct comedi_device *dev = d; struct comedi_device *dev = d;
struct comedi_subdevice *s = &dev->subdevices[0]; struct comedi_subdevice *s = &dev->subdevices[0];
comedi_cmd *cmd; struct comedi_cmd *cmd;
unsigned char intstat, valid_intstat; unsigned char intstat, valid_intstat;
unsigned char curenab; unsigned char curenab;
int retval = 0; int retval = 0;

Просмотреть файл

@ -627,14 +627,14 @@ static void pci230_ns_to_single_timer(unsigned int *ns, unsigned int round);
static void pci230_cancel_ct(struct comedi_device * dev, unsigned int ct); 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 irqreturn_t pci230_interrupt(int irq, void *d PT_REGS_ARG);
static int pci230_ao_cmdtest(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);
static int pci230_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s); 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 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_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 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_handle_ao_fifo(struct comedi_device * dev, struct comedi_subdevice * s);
static int pci230_ai_cmdtest(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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int pci230_ai_cancel(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 void pci230_ai_stop(struct comedi_device * dev, struct comedi_subdevice * s);
@ -1204,7 +1204,7 @@ static int pci230_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice *
} }
static int pci230_ao_cmdtest(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; int err = 0;
unsigned int tmp; unsigned int tmp;
@ -1451,7 +1451,7 @@ static int pci230_ao_inttrig_scan_begin(struct comedi_device * dev,
static void pci230_ao_start(struct comedi_device * dev, struct comedi_subdevice * s) static void pci230_ao_start(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
unsigned long irqflags; unsigned long irqflags;
set_bit(AO_CMD_STARTED, &devpriv->state); set_bit(AO_CMD_STARTED, &devpriv->state);
@ -1554,7 +1554,7 @@ static int pci230_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s
unsigned int range; unsigned int range;
/* Get the command. */ /* Get the command. */
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
if (cmd->scan_begin_src == TRIG_TIMER) { if (cmd->scan_begin_src == TRIG_TIMER) {
/* Claim Z2-CT1. */ /* Claim Z2-CT1. */
@ -1624,7 +1624,7 @@ static int pci230_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s
return 0; 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; unsigned int min_scan_period, chanlist_len;
int err = 0; int err = 0;
@ -1649,7 +1649,7 @@ static int pci230_ai_check_scan_period(comedi_cmd * cmd)
} }
static int pci230_ai_cmdtest(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)
{ {
int err = 0; int err = 0;
unsigned int tmp; unsigned int tmp;
@ -2037,7 +2037,7 @@ static int pci230_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
static void pci230_ai_update_fifo_trigger_level(struct comedi_device * dev, static void pci230_ai_update_fifo_trigger_level(struct comedi_device * dev,
struct comedi_subdevice * s) 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 scanlen = cmd->scan_end_arg;
unsigned int wake; unsigned int wake;
unsigned short triglev; unsigned short triglev;
@ -2148,7 +2148,7 @@ static void pci230_ai_start(struct comedi_device * dev, struct comedi_subdevice
unsigned long irqflags; unsigned long irqflags;
unsigned short conv; unsigned short conv;
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
set_bit(AI_CMD_STARTED, &devpriv->state); set_bit(AI_CMD_STARTED, &devpriv->state);
if (!devpriv->ai_continuous && (devpriv->ai_scan_count == 0)) { if (!devpriv->ai_continuous && (devpriv->ai_scan_count == 0)) {
@ -2301,7 +2301,7 @@ static int pci230_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s
/* Get the command. */ /* Get the command. */
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
/* /*
* Determine which shared resources are needed. * Determine which shared resources are needed.
@ -2627,7 +2627,7 @@ static void pci230_handle_ao_nofifo(struct comedi_device * dev, struct comedi_su
short data; short data;
int i, ret; int i, ret;
struct comedi_async *async = s->async; 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)) { if (!devpriv->ao_continuous && (devpriv->ao_scan_count == 0)) {
return; return;
@ -2662,7 +2662,7 @@ static void pci230_handle_ao_nofifo(struct comedi_device * dev, struct comedi_su
static int pci230_handle_ao_fifo(struct comedi_device * dev, struct comedi_subdevice * s) static int pci230_handle_ao_fifo(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
unsigned int num_scans; unsigned int num_scans;
unsigned int room; unsigned int room;
unsigned short dacstat; unsigned short dacstat;
@ -2866,7 +2866,7 @@ static void pci230_ao_stop(struct comedi_device * dev, struct comedi_subdevice *
unsigned long irqflags; unsigned long irqflags;
unsigned char intsrc; unsigned char intsrc;
int started; int started;
comedi_cmd *cmd; struct comedi_cmd *cmd;
comedi_spin_lock_irqsave(&devpriv->ao_stop_spinlock, irqflags); comedi_spin_lock_irqsave(&devpriv->ao_stop_spinlock, irqflags);
started = test_and_clear_bit(AO_CMD_STARTED, &devpriv->state); started = test_and_clear_bit(AO_CMD_STARTED, &devpriv->state);
@ -2925,7 +2925,7 @@ static int pci230_ao_cancel(struct comedi_device * dev, struct comedi_subdevice
static void pci230_ai_stop(struct comedi_device * dev, struct comedi_subdevice * s) static void pci230_ai_stop(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
unsigned long irqflags; unsigned long irqflags;
comedi_cmd *cmd; struct comedi_cmd *cmd;
int started; int started;
comedi_spin_lock_irqsave(&devpriv->ai_stop_spinlock, irqflags); comedi_spin_lock_irqsave(&devpriv->ai_stop_spinlock, irqflags);

Просмотреть файл

@ -113,7 +113,7 @@ static int das16cs_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static int das16cs_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s); 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, 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, static int das16cs_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static int das16cs_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s, static int das16cs_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
@ -334,7 +334,7 @@ static int das16cs_ai_cmd(struct comedi_device * dev, struct comedi_subdevice *
} }
static int das16cs_ai_cmdtest(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 err = 0;
int tmp; int tmp;

Просмотреть файл

@ -461,13 +461,13 @@ static int cb_pcidas_ao_readback_insn(struct comedi_device * dev, struct comedi_
comedi_insn * insn, unsigned int * data); 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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int cb_pcidas_ai_cmdtest(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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int cb_pcidas_ao_inttrig(struct comedi_device *dev, static int cb_pcidas_ao_inttrig(struct comedi_device *dev,
struct comedi_subdevice *subdev, struct comedi_subdevice *subdev,
unsigned int trig_num); unsigned int trig_num);
static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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 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 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_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
@ -1009,7 +1009,7 @@ static int trimpot_read_insn(struct comedi_device * dev, struct comedi_subdevice
} }
static int cb_pcidas_ai_cmdtest(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 err = 0;
int tmp; int tmp;
@ -1166,7 +1166,7 @@ static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, struct comedi_subdev
static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
unsigned int bits; unsigned int bits;
unsigned long flags; unsigned long flags;
@ -1251,7 +1251,7 @@ static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice
} }
static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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 err = 0;
int tmp; int tmp;
@ -1366,7 +1366,7 @@ static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, struct comedi_subdev
static int cb_pcidas_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s) static int cb_pcidas_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
unsigned int i; unsigned int i;
unsigned long flags; unsigned long flags;
@ -1432,7 +1432,7 @@ static int cb_pcidas_ao_inttrig(struct comedi_device *dev,
{ {
unsigned int num_bytes, num_points = thisboard->fifo_size; unsigned int num_bytes, num_points = thisboard->fifo_size;
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
unsigned long flags; unsigned long flags;
if (trig_num != 0) if (trig_num != 0)
@ -1592,7 +1592,7 @@ static void handle_ao_interrupt(struct comedi_device * dev, unsigned int status)
{ {
struct comedi_subdevice *s = dev->write_subdev; struct comedi_subdevice *s = dev->write_subdev;
struct comedi_async *async = s->async; 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 half_fifo = thisboard->fifo_size / 2;
unsigned int num_points; unsigned int num_points;
unsigned int flags; unsigned int flags;

Просмотреть файл

@ -1144,12 +1144,12 @@ static int ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s); static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int ai_cmdtest(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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * subdev, static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * subdev,
unsigned int trig_num); unsigned int trig_num);
static int ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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 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 ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static int ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s); static int ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
@ -1175,7 +1175,7 @@ static int ad8402_write_insn(struct comedi_device * dev, struct comedi_subdevice
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s, static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data); 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 unsigned int get_divisor(unsigned int ns, unsigned int flags);
static void i2c_write(struct comedi_device * dev, unsigned int address, static void i2c_write(struct comedi_device * dev, unsigned int address,
const uint8_t * data, unsigned int length); const uint8_t * data, unsigned int length);
@ -1194,9 +1194,9 @@ static int set_ai_fifo_segment_length(struct comedi_device * dev,
unsigned int num_entries); unsigned int num_entries);
static void disable_ai_pacing(struct comedi_device * dev); static void disable_ai_pacing(struct comedi_device * dev);
static void disable_ai_interrupts(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 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); COMEDI_PCI_INITCLEANUP(driver_cb_pcidas, pcidas64_pci_table);
@ -2129,7 +2129,7 @@ static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice *
} }
static int ai_cmdtest(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)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -2313,7 +2313,7 @@ static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
return 0; 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 // disable for now until I work out a race
return 0; return 0;
@ -2324,7 +2324,7 @@ static int use_hw_sample_counter(comedi_cmd * cmd)
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) { if (cmd->stop_src == TRIG_COUNT) {
// set software count // set software count
@ -2387,7 +2387,7 @@ static void disable_ai_interrupts(struct comedi_device * dev)
DEBUG_PRINT("intr enable bits 0x%x\n", priv(dev)->intr_enable_bits); 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; uint32_t bits;
unsigned long flags; unsigned long flags;
@ -2409,13 +2409,13 @@ static void enable_ai_interrupts(struct comedi_device * dev, const comedi_cmd *
} }
static uint32_t ai_convert_counter_6xxx(const struct comedi_device * dev, 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 // supposed to load counter with desired divisor minus 3
return cmd->convert_arg / TIMER_BASE - 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; uint32_t count;
// figure out how long we need to delay at end of scan // figure out how long we need to delay at end of scan
@ -2435,7 +2435,7 @@ static uint32_t ai_scan_counter_6xxx(struct comedi_device * dev, comedi_cmd * cm
return count - 3; 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; unsigned int divisor;
@ -2457,7 +2457,7 @@ static uint32_t ai_convert_counter_4020(struct comedi_device * dev, comedi_cmd *
} }
static void select_master_clock_4020(struct comedi_device * dev, static void select_master_clock_4020(struct comedi_device * dev,
const comedi_cmd * cmd) const struct comedi_cmd * cmd)
{ {
// select internal/external master clock // select internal/external master clock
priv(dev)->hw_config_bits &= ~MASTER_CLOCK_4020_MASK; priv(dev)->hw_config_bits &= ~MASTER_CLOCK_4020_MASK;
@ -2475,7 +2475,7 @@ static void select_master_clock_4020(struct comedi_device * dev,
priv(dev)->main_iobase + HW_CONFIG_REG); 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) { switch (board(dev)->layout) {
case LAYOUT_4020: case LAYOUT_4020:
@ -2503,7 +2503,7 @@ static inline void dma_start_sync(struct comedi_device * dev, unsigned int chann
comedi_spin_unlock_irqrestore(&dev->spinlock, flags); 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; uint32_t convert_counter = 0, scan_counter = 0;
@ -2534,7 +2534,7 @@ static void set_ai_pacing(struct comedi_device * dev, comedi_cmd * cmd)
DEBUG_PRINT("scan counter 0x%x\n", scan_counter); 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; int i;
for (i = 0; i + 1 < cmd->chanlist_len; i++) { for (i = 0; i + 1 < cmd->chanlist_len; i++) {
@ -2550,7 +2550,7 @@ static int use_internal_queue_6xxx(const comedi_cmd * cmd)
return 1; 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; unsigned short bits;
int i; int i;
@ -2682,7 +2682,7 @@ static inline void load_first_dma_descriptor(struct comedi_device * dev,
static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
uint32_t bits; uint32_t bits;
unsigned int i; unsigned int i;
unsigned long flags; unsigned long flags;
@ -2801,7 +2801,7 @@ static void pio_drain_ai_fifo_16(struct comedi_device * dev)
{ {
struct comedi_subdevice *s = dev->read_subdev; struct comedi_subdevice *s = dev->read_subdev;
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
unsigned int i; unsigned int i;
uint16_t prepost_bits; uint16_t prepost_bits;
int read_segment, read_index, write_segment, write_index; int read_segment, read_index, write_segment, write_index;
@ -2868,7 +2868,7 @@ static void pio_drain_ai_fifo_32(struct comedi_device * dev)
{ {
struct comedi_subdevice *s = dev->read_subdev; struct comedi_subdevice *s = dev->read_subdev;
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
unsigned int i; unsigned int i;
unsigned int max_transfer = 100000; unsigned int max_transfer = 100000;
uint32_t fifo_data; uint32_t fifo_data;
@ -2957,7 +2957,7 @@ void handle_ai_interrupt(struct comedi_device * dev, unsigned short status,
{ {
struct comedi_subdevice *s = dev->read_subdev; struct comedi_subdevice *s = dev->read_subdev;
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
uint8_t dma1_status; uint8_t dma1_status;
unsigned long flags; unsigned long flags;
@ -3036,7 +3036,7 @@ static int last_ao_dma_load_completed(struct comedi_device * dev)
return 1; 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) if (cmd->stop_src == TRIG_NONE)
return 1; return 1;
@ -3079,7 +3079,7 @@ static void handle_ao_interrupt(struct comedi_device * dev, unsigned short statu
{ {
struct comedi_subdevice *s = dev->write_subdev; struct comedi_subdevice *s = dev->write_subdev;
struct comedi_async *async; struct comedi_async *async;
comedi_cmd *cmd; struct comedi_cmd *cmd;
uint8_t dma0_status; uint8_t dma0_status;
unsigned long flags; unsigned long flags;
@ -3232,7 +3232,7 @@ static int ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice
return 1; 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 | unsigned int bits = DAC_ENABLE_BIT | WAVEFORM_GATE_LEVEL_BIT |
WAVEFORM_GATE_ENABLE_BIT | WAVEFORM_GATE_SELECT_BIT; WAVEFORM_GATE_ENABLE_BIT | WAVEFORM_GATE_SELECT_BIT;
@ -3252,7 +3252,7 @@ static void set_dac_control0_reg(struct comedi_device * dev, const comedi_cmd *
writew(bits, priv(dev)->main_iobase + DAC_CONTROL0_REG); 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; int i;
@ -3269,7 +3269,7 @@ static void set_dac_control1_reg(struct comedi_device * dev, const comedi_cmd *
priv(dev)->main_iobase + DAC_CONTROL1_REG); 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; uint16_t bits;
unsigned int first_channel, last_channel; unsigned int first_channel, last_channel;
@ -3284,7 +3284,7 @@ static void set_dac_select_reg(struct comedi_device * dev, const comedi_cmd * cm
writew(bits, priv(dev)->main_iobase + DAC_SELECT_REG); 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; unsigned int divisor;
@ -3303,7 +3303,7 @@ static void set_dac_interval_regs(struct comedi_device * dev, const comedi_cmd *
} }
static unsigned int load_ao_dma_buffer(struct comedi_device * dev, 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 num_bytes, buffer_index, prev_buffer_index;
unsigned int next_bits; unsigned int next_bits;
@ -3346,7 +3346,7 @@ static unsigned int load_ao_dma_buffer(struct comedi_device * dev,
return num_bytes; 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 num_bytes;
unsigned int next_transfer_addr; unsigned int next_transfer_addr;
@ -3368,7 +3368,7 @@ static void load_ao_dma(struct comedi_device * dev, const comedi_cmd * cmd)
} while (num_bytes >= DMA_BUFFER_SIZE); } 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; unsigned int num_bytes;
int i; int i;
@ -3415,7 +3415,7 @@ static inline int external_ai_queue_in_use(struct comedi_device * dev)
static int ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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)) { if (external_ai_queue_in_use(dev)) {
warn_external_queue(dev); warn_external_queue(dev);
@ -3441,7 +3441,7 @@ static int ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s, static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trig_num) unsigned int trig_num)
{ {
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
int retval; int retval;
if (trig_num != 0) if (trig_num != 0)
@ -3462,7 +3462,7 @@ static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
} }
static int ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -3851,7 +3851,7 @@ static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice
* sets cmd members appropriately. * sets cmd members appropriately.
* adc paces conversions from master clock by dividing by (x + 3) where x is 24 bit number * 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; unsigned int convert_divisor = 0, scan_divisor;
static const int min_convert_divisor = 3; static const int min_convert_divisor = 3;

Просмотреть файл

@ -238,7 +238,7 @@ static int cb_pcidda_detach(struct comedi_device * dev);
static int cb_pcidda_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s, static int cb_pcidda_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data); 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_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 int cb_pcidda_ns_to_timer(unsigned int *ns,int round);
static unsigned int cb_pcidda_serial_in(struct comedi_device * dev); static unsigned int cb_pcidda_serial_in(struct comedi_device * dev);
static void cb_pcidda_serial_out(struct comedi_device * dev, unsigned int value, static void cb_pcidda_serial_out(struct comedi_device * dev, unsigned int value,
@ -433,7 +433,7 @@ static int cb_pcidda_ai_cmd(struct comedi_device * dev, struct comedi_subdevice
#if 0 #if 0
static int cb_pcidda_ai_cmdtest(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) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;

Просмотреть файл

@ -178,7 +178,7 @@ static int parport_intr_insn(struct comedi_device *dev, struct comedi_subdevice
} }
static int parport_intr_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, static int parport_intr_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd) struct comedi_cmd *cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;

Просмотреть файл

@ -145,7 +145,7 @@ typedef struct {
RT_TASK *scan_task; // rt task that controls conversion timing in a scan RT_TASK *scan_task; // rt task that controls conversion timing in a scan
/* io_function can point to either an input or output function /* io_function can point to either an input or output function
* depending on what kind of subdevice we are emulating for */ * 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); unsigned int index);
// RTIME has units of 1 = 838 nanoseconds // RTIME has units of 1 = 838 nanoseconds
// time at which first scan started, used to check scan timing // time at which first scan started, used to check scan timing
@ -156,8 +156,8 @@ typedef struct {
RTIME convert_period; RTIME convert_period;
// flags // flags
volatile int stop; // indicates we should stop volatile int stop; // indicates we should stop
volatile int rt_task_active; // indicates rt_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 comedi_cmd volatile int scan_task_active; // indicates scan_task is servicing a struct comedi_cmd
unsigned timer_running:1; unsigned timer_running:1;
} timer_private; } timer_private;
#define devpriv ((timer_private *)dev->private) #define devpriv ((timer_private *)dev->private)
@ -206,7 +206,7 @@ inline static int check_conversion_timing(struct comedi_device * dev,
} }
// devpriv->io_function for an input subdevice // 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) unsigned int index)
{ {
struct comedi_subdevice *s = dev->read_subdev; struct comedi_subdevice *s = dev->read_subdev;
@ -231,7 +231,7 @@ static int timer_data_read(struct comedi_device * dev, comedi_cmd * cmd,
} }
// devpriv->io_function for an output subdevice // 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) unsigned int index)
{ {
struct comedi_subdevice *s = dev->write_subdev; struct comedi_subdevice *s = dev->write_subdev;
@ -266,7 +266,7 @@ static int timer_data_write(struct comedi_device * dev, comedi_cmd * cmd,
} }
// devpriv->io_function for DIO subdevices // 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) unsigned int index)
{ {
struct comedi_subdevice *s = dev->read_subdev; struct comedi_subdevice *s = dev->read_subdev;
@ -293,12 +293,12 @@ static void scan_task_func(comedi_rt_task_context_t d)
struct comedi_device *dev = (struct comedi_device *) d; struct comedi_device *dev = (struct comedi_device *) d;
struct comedi_subdevice *s = dev->subdevices + 0; struct comedi_subdevice *s = dev->subdevices + 0;
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
int i, ret; int i, ret;
unsigned long long n; unsigned long long n;
RTIME scan_start; RTIME scan_start;
// every comedi_cmd causes one execution of while loop // every struct comedi_cmd causes one execution of while loop
while (1) { while (1) {
devpriv->scan_task_active = 1; devpriv->scan_task_active = 1;
// each for loop completes one scan // each for loop completes one scan
@ -353,7 +353,7 @@ static void scan_task_func(comedi_rt_task_context_t d)
comedi_event(dev, s); comedi_event(dev, s);
async->events = 0; async->events = 0;
devpriv->scan_task_active = 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); rt_task_suspend(devpriv->scan_task);
} }
} }
@ -362,11 +362,11 @@ static void timer_task_func(comedi_rt_task_context_t d)
{ {
struct comedi_device *dev = (struct comedi_device *) d; struct comedi_device *dev = (struct comedi_device *) d;
struct comedi_subdevice *s = dev->subdevices + 0; struct comedi_subdevice *s = dev->subdevices + 0;
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
int ret; int ret;
unsigned long long n; 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) { while (1) {
devpriv->rt_task_active = 1; devpriv->rt_task_active = 1;
devpriv->scan_task_active = 1; devpriv->scan_task_active = 1;
@ -391,7 +391,7 @@ static void timer_task_func(comedi_rt_task_context_t d)
cleanup: cleanup:
devpriv->rt_task_active = 0; devpriv->rt_task_active = 0;
// suspend until next comedi_cmd // suspend until next struct comedi_cmd
rt_task_suspend(devpriv->rt_task); rt_task_suspend(devpriv->rt_task);
} }
} }
@ -407,7 +407,7 @@ static int timer_insn(struct comedi_device * dev, struct comedi_subdevice * s,
return comedi_do_insn(devpriv->device, &xinsn); 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 start_src,
unsigned int scan_begin_src, unsigned int scan_begin_src,
unsigned int convert_src, unsigned int convert_src,
@ -445,7 +445,7 @@ static int cmdtest_helper(comedi_cmd * cmd,
} }
static int timer_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int timer_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
unsigned int start_src = 0; unsigned int start_src = 0;
@ -519,12 +519,12 @@ static int timer_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s
static int timer_cmd(struct comedi_device * dev, struct comedi_subdevice * s) static int timer_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
int ret; int ret;
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
/* hack attack: drivers are not supposed to do this: */ /* hack attack: drivers are not supposed to do this: */
dev->rt = 1; 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) if (devpriv->rt_task_active || devpriv->scan_task_active)
return -EBUSY; return -EBUSY;
@ -581,7 +581,7 @@ static int timer_inttrig(struct comedi_device * dev, struct comedi_subdevice * s
static int timer_start_cmd(struct comedi_device * dev, struct comedi_subdevice * s) static int timer_start_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
RTIME now, delay, period; RTIME now, delay, period;
int ret; int ret;

Просмотреть файл

@ -108,7 +108,7 @@ static struct comedi_driver driver_waveform = {
COMEDI_INITCLEANUP(driver_waveform); COMEDI_INITCLEANUP(driver_waveform);
static int waveform_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, 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_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_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
static int waveform_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s, static int waveform_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
@ -145,7 +145,7 @@ static void waveform_ai_interrupt(unsigned long arg)
{ {
struct comedi_device *dev = (struct comedi_device *) arg; struct comedi_device *dev = (struct comedi_device *) arg;
struct comedi_async *async = dev->read_subdev->async; struct comedi_async *async = dev->read_subdev->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
unsigned int i, j; unsigned int i, j;
/* all times in microsec */ /* all times in microsec */
unsigned long elapsed_time; unsigned long elapsed_time;
@ -270,7 +270,7 @@ static int waveform_detach(struct comedi_device *dev)
} }
static int waveform_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, static int waveform_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd) struct comedi_cmd *cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -399,7 +399,7 @@ static int waveform_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevic
static int waveform_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) 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) { if (cmd->flags & TRIG_RT) {
comedi_error(dev, comedi_error(dev,

Просмотреть файл

@ -92,7 +92,7 @@ static int contec_do_insn_bits(struct comedi_device * dev, struct comedi_subdevi
#if 0 #if 0
static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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); static int contec_ns_to_timer(unsigned int *ns, int round);
#endif #endif
@ -180,7 +180,7 @@ static int contec_detach(struct comedi_device * dev)
#if 0 #if 0
static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
printk("contec_cmdtest called\n"); printk("contec_cmdtest called\n");
return 0; return 0;

Просмотреть файл

@ -336,7 +336,7 @@ static int das16_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice *
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s, 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_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s);
static int das16_cancel(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, static void das16_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
@ -351,7 +351,7 @@ static unsigned int das16_set_pacer(struct comedi_device * dev, unsigned int ns,
int flags); int flags);
static int das1600_mode_detect(struct comedi_device * dev); static int das1600_mode_detect(struct comedi_device * dev);
static unsigned int das16_suggest_transfer_size(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); static void reg_dump(struct comedi_device * dev);
@ -743,7 +743,7 @@ struct das16_private_struct {
#define thisboard ((struct das16_board_struct *)(dev->board_ptr)) #define thisboard ((struct das16_board_struct *)(dev->board_ptr))
static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s, 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 err = 0, tmp;
int gain, start_chan, i; int gain, start_chan, i;
@ -896,7 +896,7 @@ static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice *
static int das16_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s) static int das16_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
unsigned int byte; unsigned int byte;
unsigned long flags; unsigned long flags;
int range; int range;
@ -1202,7 +1202,7 @@ static void das16_interrupt(struct comedi_device * dev)
unsigned long dma_flags, spin_flags; unsigned long dma_flags, spin_flags;
struct comedi_subdevice *s = dev->read_subdev; struct comedi_subdevice *s = dev->read_subdev;
struct comedi_async *async; struct comedi_async *async;
comedi_cmd *cmd; struct comedi_cmd *cmd;
int num_bytes, residue; int num_bytes, residue;
int buffer_index; int buffer_index;
@ -1675,7 +1675,7 @@ COMEDI_INITCLEANUP(driver_das16);
// utility function that suggests a dma transfer size in bytes // utility function that suggests a dma transfer size in bytes
static unsigned int das16_suggest_transfer_size(struct comedi_device * dev, static unsigned int das16_suggest_transfer_size(struct comedi_device * dev,
comedi_cmd cmd) struct comedi_cmd cmd)
{ {
unsigned int size; unsigned int size;
unsigned int freq; unsigned int freq;

Просмотреть файл

@ -38,7 +38,7 @@ significantly different.
I was _barely_ able to reach the full 1 MHz capability I was _barely_ able to reach the full 1 MHz capability
of this board, using a hard real-time interrupt 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 rtlinux or RTAI). The board can't do dma, so the bottleneck is
pulling the data across the ISA bus. I timed the interrupt pulling the data across the ISA bus. I timed the interrupt
handler, and it took my computer ~470 microseconds to pull 512 handler, and it took my computer ~470 microseconds to pull 512
@ -139,7 +139,7 @@ static int das16m1_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static int das16m1_cmd_test(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);
static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s); 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_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
@ -201,7 +201,7 @@ static inline short munge_sample(short data)
} }
static int das16m1_cmd_test(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; unsigned int err = 0, tmp, i;
@ -325,7 +325,7 @@ static int das16m1_cmd_test(struct comedi_device * dev, struct comedi_subdevice
static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s) static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
unsigned int byte, i; unsigned int byte, i;
if (dev->irq == 0) { if (dev->irq == 0) {
@ -518,7 +518,7 @@ static void das16m1_handler(struct comedi_device * dev, unsigned int status)
{ {
struct comedi_subdevice *s; struct comedi_subdevice *s;
struct comedi_async *async; struct comedi_async *async;
comedi_cmd *cmd; struct comedi_cmd *cmd;
u16 num_samples; u16 num_samples;
u16 hw_counter; u16 hw_counter;

Просмотреть файл

@ -197,7 +197,7 @@ static void das1800_handle_fifo_half_full(struct comedi_device * dev,
static void das1800_handle_fifo_not_empty(struct comedi_device * dev, static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
struct comedi_subdevice * s); struct comedi_subdevice * s);
static int das1800_ai_do_cmdtest(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_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int das1800_ai_rinsn(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); comedi_insn * insn, unsigned int * data);
@ -210,7 +210,7 @@ static int das1800_do_wbits(struct comedi_device * dev, struct comedi_subdevice
static int das1800_set_frequency(struct comedi_device * dev); 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 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 // analog input ranges
static const struct comedi_lrange range_ai_das1801 = { static const struct comedi_lrange range_ai_das1801 = {
@ -913,7 +913,7 @@ static void das1800_ai_handler(struct comedi_device * dev)
{ {
struct comedi_subdevice *s = dev->subdevices + 0; /* analog input subdevice */ struct comedi_subdevice *s = dev->subdevices + 0; /* analog input subdevice */
struct comedi_async *async = s->async; 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); unsigned int status = inb(dev->iobase + DAS1800_STATUS);
async->events = 0; async->events = 0;
@ -1027,7 +1027,7 @@ static void das1800_flush_dma_channel(struct comedi_device * dev, struct comedi_
unsigned int channel, uint16_t * buffer) unsigned int channel, uint16_t * buffer)
{ {
unsigned int num_bytes, num_samples; unsigned int num_bytes, num_samples;
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
disable_dma(channel); disable_dma(channel);
@ -1087,7 +1087,7 @@ static void das1800_handle_fifo_half_full(struct comedi_device * dev,
struct comedi_subdevice * s) struct comedi_subdevice * s)
{ {
int numPoints = 0; /* number of points to read */ 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; numPoints = FIFO_SIZE / 2;
/* if we only need some of the points */ /* if we only need some of the points */
@ -1107,7 +1107,7 @@ static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
{ {
short dpnt; short dpnt;
int unipolar; int unipolar;
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
unipolar = inb(dev->iobase + DAS1800_CONTROL_C) & UB; unipolar = inb(dev->iobase + DAS1800_CONTROL_C) & UB;
@ -1140,7 +1140,7 @@ static int das1800_cancel(struct comedi_device * dev, struct comedi_subdevice *
/* test analog input cmd */ /* test analog input cmd */
static int das1800_ai_do_cmdtest(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)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -1314,7 +1314,7 @@ static int das1800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subde
// first, some utility functions used in the main ai_do_cmd() // first, some utility functions used in the main ai_do_cmd()
// returns appropriate bits for control register a, depending on command // 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; int control_a;
@ -1337,7 +1337,7 @@ static int control_a_bits(comedi_cmd cmd)
} }
// returns appropriate bits for control register c, depending on command // 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 control_c;
int aref; int aref;
@ -1385,7 +1385,7 @@ static int control_c_bits(comedi_cmd cmd)
} }
// sets up counters // 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 // setup cascaded counters for conversion/scan frequency
switch (cmd.scan_begin_src) { switch (cmd.scan_begin_src) {
@ -1424,7 +1424,7 @@ static int setup_counters(struct comedi_device * dev, comedi_cmd cmd)
} }
// sets up dma // 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; unsigned long lock_flags;
const int dual_dma = devpriv->irq_dma_bits & DMA_DUAL; const int dual_dma = devpriv->irq_dma_bits & DMA_DUAL;
@ -1462,7 +1462,7 @@ static void setup_dma(struct comedi_device * dev, comedi_cmd cmd)
} }
// programs channel/gain list into card // 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; int i, n, chan_range;
unsigned long irq_flags; unsigned long irq_flags;
@ -1494,7 +1494,7 @@ static int das1800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice
int ret; int ret;
int control_a, control_c; int control_a, control_c;
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd cmd = async->cmd; struct comedi_cmd cmd = async->cmd;
if (!dev->irq) { if (!dev->irq) {
comedi_error(dev, comedi_error(dev,
@ -1720,7 +1720,7 @@ static unsigned int burst_convert_arg(unsigned int convert_arg, int round_mode)
} }
// utility function that suggests a dma transfer size based on the conversion period 'ns' // 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; unsigned int size = DMA_BUF_SIZE;
static const int sample_size = 2; // size in bytes of one sample from board static const int sample_size = 2; // size in bytes of one sample from board

Просмотреть файл

@ -260,7 +260,7 @@ static irqreturn_t das800_interrupt(int irq, void *d PT_REGS_ARG);
static void enable_das800(struct comedi_device * dev); static void enable_das800(struct comedi_device * dev);
static void disable_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, 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_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int das800_ai_rinsn(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); comedi_insn * insn, unsigned int * data);
@ -585,7 +585,7 @@ static void disable_das800(struct comedi_device * dev)
} }
static int das800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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 err = 0;
int tmp; int tmp;

Просмотреть файл

@ -300,7 +300,7 @@ static int dmm32at_dio_insn_bits(struct comedi_device * dev, struct comedi_subde
static int dmm32at_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s, static int dmm32at_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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_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_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static int dmm32at_ns_to_timer(unsigned int *ns, int round); static int dmm32at_ns_to_timer(unsigned int *ns, int round);
@ -569,7 +569,7 @@ static int dmm32at_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice
} }
static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -754,7 +754,7 @@ static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevic
static int dmm32at_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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; int i, range;
unsigned char chanlo, chanhi, status; unsigned char chanlo, chanhi, status;
@ -845,7 +845,7 @@ static irqreturn_t dmm32at_isr(int irq, void *d PT_REGS_ARG)
if (intstat & DMM32AT_ADINT) { if (intstat & DMM32AT_ADINT) {
struct comedi_subdevice *s = dev->read_subdev; 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++) { for (i = 0; i < cmd->chanlist_len; i++) {
/* read data */ /* read data */

Просмотреть файл

@ -133,7 +133,7 @@ static int dt2814_ns_to_timer(unsigned int *ns, unsigned int flags)
} }
static int dt2814_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int dt2814_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -226,7 +226,7 @@ static int dt2814_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
static int dt2814_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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 chan;
int trigvar; int trigvar;

Просмотреть файл

@ -707,7 +707,7 @@ static int dt282x_ai_insn_read(struct comedi_device * dev, struct comedi_subdevi
} }
static int dt282x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int dt282x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -820,7 +820,7 @@ static int dt282x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
static int dt282x_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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; int timer;
if (devpriv->usedma == 0) { if (devpriv->usedma == 0) {
@ -979,7 +979,7 @@ static int dt282x_ao_insn_write(struct comedi_device * dev, struct comedi_subdev
} }
static int dt282x_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int dt282x_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -1102,7 +1102,7 @@ static int dt282x_ao_inttrig(struct comedi_device * dev, struct comedi_subdevice
static int dt282x_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s) static int dt282x_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
int timer; int timer;
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
if (devpriv->usedma == 0) { if (devpriv->usedma == 0) {
comedi_error(dev, comedi_error(dev,

Просмотреть файл

@ -426,7 +426,7 @@ static void dt3k_ai_empty_fifo(struct comedi_device * dev, struct comedi_subdevi
} }
static int dt3k_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int dt3k_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -589,7 +589,7 @@ static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec,
static int dt3k_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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; int i;
unsigned int chan, range, aref; unsigned int chan, range, aref;
unsigned int divider; unsigned int divider;

Просмотреть файл

@ -57,7 +57,7 @@ static int hpdi_detach(struct comedi_device * dev);
void abort_dma(struct comedi_device * dev, unsigned int channel); 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(struct comedi_device * dev, struct comedi_subdevice * s);
static int hpdi_cmd_test(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 int hpdi_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG); 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 dio_config_block_size(struct comedi_device * dev, unsigned int * data);
@ -719,7 +719,7 @@ 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, static int di_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -819,7 +819,7 @@ static int di_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
} }
static int hpdi_cmd_test(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)
{ {
if (priv(dev)->dio_config_output) { if (priv(dev)->dio_config_output) {
return -EINVAL; return -EINVAL;
@ -839,7 +839,7 @@ static int di_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
uint32_t bits; uint32_t bits;
unsigned long flags; unsigned long flags;
struct comedi_async *async = s->async; 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); hpdi_writel(dev, RX_FIFO_RESET_BIT, BOARD_CONTROL_REG);

Просмотреть файл

@ -166,27 +166,27 @@ static int me4000_ai_insn_read(struct comedi_device *dev,
static int me4000_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s); static int me4000_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
static int ai_check_chanlist(struct comedi_device *dev, 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, static int ai_round_cmd_args(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
comedi_cmd *cmd, struct comedi_cmd *cmd,
unsigned int *init_ticks, unsigned int *init_ticks,
unsigned int *scan_ticks, unsigned int *chan_ticks); unsigned int *scan_ticks, unsigned int *chan_ticks);
static int ai_prepare(struct comedi_device *dev, static int ai_prepare(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
comedi_cmd *cmd, struct comedi_cmd *cmd,
unsigned int init_ticks, unsigned int init_ticks,
unsigned int scan_ticks, unsigned int chan_ticks); unsigned int scan_ticks, unsigned int chan_ticks);
static int ai_write_chanlist(struct comedi_device *dev, 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 irqreturn_t me4000_ai_isr(int irq, void *dev_id PT_REGS_ARG);
static int me4000_ai_do_cmd_test(struct comedi_device *dev, 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 me4000_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
@ -1055,7 +1055,7 @@ static int me4000_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *
} }
static int ai_check_chanlist(struct comedi_device *dev, 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 aref;
int i; int i;
@ -1137,7 +1137,7 @@ static int ai_check_chanlist(struct comedi_device *dev,
static int ai_round_cmd_args(struct comedi_device *dev, static int ai_round_cmd_args(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
comedi_cmd *cmd, struct comedi_cmd *cmd,
unsigned int *init_ticks, unsigned int *init_ticks,
unsigned int *scan_ticks, unsigned int *chan_ticks) unsigned int *scan_ticks, unsigned int *chan_ticks)
{ {
@ -1224,7 +1224,7 @@ static void ai_write_timer(struct comedi_device *dev,
static int ai_prepare(struct comedi_device *dev, static int ai_prepare(struct comedi_device *dev,
struct comedi_subdevice *s, struct comedi_subdevice *s,
comedi_cmd *cmd, struct comedi_cmd *cmd,
unsigned int init_ticks, unsigned int init_ticks,
unsigned int scan_ticks, unsigned int chan_ticks) unsigned int scan_ticks, unsigned int chan_ticks)
{ {
@ -1292,7 +1292,7 @@ static int ai_prepare(struct comedi_device *dev,
} }
static int ai_write_chanlist(struct comedi_device *dev, 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 entry;
unsigned int chan; unsigned int chan;
@ -1337,7 +1337,7 @@ static int me4000_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *
unsigned int init_ticks = 0; unsigned int init_ticks = 0;
unsigned int scan_ticks = 0; unsigned int scan_ticks = 0;
unsigned int chan_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"); CALL_PDEBUG("In me4000_ai_do_cmd()\n");
@ -1376,7 +1376,7 @@ static int me4000_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *
* So I tried to adopt this scheme. * So I tried to adopt this scheme.
*/ */
static int me4000_ai_do_cmd_test(struct comedi_device *dev, 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; unsigned int init_ticks;

Просмотреть файл

@ -450,7 +450,7 @@ static int me_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
/* Test analog input command */ /* Test analog input command */
static int me_ai_do_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s, static int me_ai_do_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd) struct comedi_cmd *cmd)
{ {
return 0; return 0;
} }

Просмотреть файл

@ -231,7 +231,7 @@ static irqreturn_t ni6527_interrupt(int irq, void *d PT_REGS_ARG)
} }
static int ni6527_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int ni6527_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -308,7 +308,7 @@ static int ni6527_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevi
static int ni6527_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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, writeb(ClrEdge | ClrOverflow,
devpriv->mite->daq_io_addr + Clear_Register); devpriv->mite->daq_io_addr + Clear_Register);

Просмотреть файл

@ -472,7 +472,7 @@ static irqreturn_t ni_65xx_interrupt(int irq, void *d PT_REGS_ARG)
} }
static int ni_65xx_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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 err = 0;
int tmp; int tmp;
@ -549,7 +549,7 @@ static int ni_65xx_intr_cmdtest(struct comedi_device * dev, struct comedi_subdev
static int ni_65xx_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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, writeb(ClrEdge | ClrOverflow,
private(dev)->mite->daq_io_addr + Clear_Register); private(dev)->mite->daq_io_addr + Clear_Register);

Просмотреть файл

@ -848,7 +848,7 @@ static int ni_660x_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
int retval; int retval;
struct ni_gpct *counter = subdev_to_counter(s); 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); retval = ni_660x_request_mite_channel(dev, counter, COMEDI_INPUT);
if (retval) { if (retval) {
@ -863,7 +863,7 @@ static int ni_660x_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
} }
static int ni_660x_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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); struct ni_gpct *counter = subdev_to_counter(s);

Просмотреть файл

@ -180,7 +180,7 @@ static struct comedi_driver driver_a2150 = {
static irqreturn_t a2150_interrupt(int irq, void *d PT_REGS_ARG); 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, 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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int a2150_ai_rinsn(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); comedi_insn * insn, unsigned int * data);
@ -215,7 +215,7 @@ static irqreturn_t a2150_interrupt(int irq, void *d PT_REGS_ARG)
struct comedi_device *dev = d; struct comedi_device *dev = d;
struct comedi_subdevice *s = dev->read_subdev; struct comedi_subdevice *s = dev->read_subdev;
struct comedi_async *async; struct comedi_async *async;
comedi_cmd *cmd; struct comedi_cmd *cmd;
unsigned int max_points, num_points, residue, leftover; unsigned int max_points, num_points, residue, leftover;
short dpnt; short dpnt;
static const int sample_size = sizeof(devpriv->dma_buffer[0]); static const int sample_size = sizeof(devpriv->dma_buffer[0]);
@ -486,7 +486,7 @@ static int a2150_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
} }
static int a2150_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int a2150_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -618,7 +618,7 @@ static int a2150_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
static int a2150_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) static int a2150_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
unsigned long lock_flags; unsigned long lock_flags;
unsigned int old_config_bits = devpriv->config_bits; unsigned int old_config_bits = devpriv->config_bits;
unsigned int trigger_bits; unsigned int trigger_bits;

Просмотреть файл

@ -127,7 +127,7 @@ static int atmio16d_attach(struct comedi_device * dev, comedi_devconfig * it);
static int atmio16d_detach(struct comedi_device * dev); static int atmio16d_detach(struct comedi_device * dev);
static irqreturn_t atmio16d_interrupt(int irq, void *d PT_REGS_ARG); 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, 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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int atmio16d_ai_cancel(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 void reset_counters(struct comedi_device * dev);
@ -269,7 +269,7 @@ 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, static int atmio16d_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0, tmp; int err = 0, tmp;
#ifdef DEBUG1 #ifdef DEBUG1
@ -371,7 +371,7 @@ static int atmio16d_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevi
static int atmio16d_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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 timer, base_clock;
unsigned int sample_count, tmp, chan, gain; unsigned int sample_count, tmp, chan, gain;
int i; int i;

Просмотреть файл

@ -200,7 +200,7 @@ static void do_config(struct comedi_device * dev, struct comedi_subdevice * s)
} }
static int subdev_700_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int subdev_700_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
unsigned int tmp; unsigned int tmp;

Просмотреть файл

@ -171,7 +171,7 @@ static void labpc_drain_dma(struct comedi_device * dev);
static void handle_isa_dma(struct comedi_device * dev); static void handle_isa_dma(struct comedi_device * dev);
static void labpc_drain_dregs(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, 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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int labpc_ai_rinsn(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);
@ -187,8 +187,8 @@ static int labpc_eeprom_read_insn(struct comedi_device * dev, struct comedi_subd
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, static int labpc_eeprom_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static unsigned int labpc_suggest_transfer_size(comedi_cmd cmd); static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd);
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);
#ifdef CONFIG_COMEDI_PCI #ifdef CONFIG_COMEDI_PCI
static int labpc_find_device(struct comedi_device *dev, int bus, int slot); static int labpc_find_device(struct comedi_device *dev, int bus, int slot);
#endif #endif
@ -770,7 +770,7 @@ static int labpc_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
return 0; 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) if (cmd->chanlist_len == 1)
return MODE_SINGLE_CHAN; return MODE_SINGLE_CHAN;
@ -794,7 +794,7 @@ static enum scan_mode labpc_ai_scan_mode(const comedi_cmd * cmd)
} }
static int labpc_ai_chanlist_invalid(const struct comedi_device * dev, 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; int mode, channel, range, aref, i;
@ -865,7 +865,7 @@ static int labpc_ai_chanlist_invalid(const struct comedi_device * dev,
return 0; 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) if (labpc_ai_scan_mode(cmd) == MODE_SINGLE_CHAN)
return 1; return 1;
@ -876,7 +876,7 @@ static int labpc_use_continuous_mode(const comedi_cmd * cmd)
return 0; 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) if (cmd->convert_src != TRIG_TIMER)
return 0; return 0;
@ -888,7 +888,7 @@ static unsigned int labpc_ai_convert_period(const comedi_cmd * cmd)
return cmd->convert_arg; 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) if (cmd->convert_src != TRIG_TIMER)
return; return;
@ -902,7 +902,7 @@ static void labpc_set_ai_convert_period(comedi_cmd * cmd, unsigned int ns)
cmd->convert_arg = ns; 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) if (cmd->scan_begin_src != TRIG_TIMER)
return 0; return 0;
@ -914,7 +914,7 @@ static unsigned int labpc_ai_scan_period(const comedi_cmd * cmd)
return cmd->scan_begin_arg; 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) if (cmd->scan_begin_src != TRIG_TIMER)
return; return;
@ -927,7 +927,7 @@ static void labpc_set_ai_scan_period(comedi_cmd * cmd, unsigned int ns)
} }
static int labpc_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int labpc_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp, tmp2; int tmp, tmp2;
@ -1069,7 +1069,7 @@ static int labpc_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
unsigned long irq_flags; unsigned long irq_flags;
int ret; int ret;
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
enum transfer_type xfer; enum transfer_type xfer;
unsigned long flags; unsigned long flags;
@ -1314,7 +1314,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d PT_REGS_ARG)
struct comedi_device *dev = d; struct comedi_device *dev = d;
struct comedi_subdevice *s = dev->read_subdev; struct comedi_subdevice *s = dev->read_subdev;
struct comedi_async *async; struct comedi_async *async;
comedi_cmd *cmd; struct comedi_cmd *cmd;
if (dev->attached == 0) { if (dev->attached == 0) {
comedi_error(dev, "premature interrupt"); comedi_error(dev, "premature interrupt");
@ -1680,7 +1680,7 @@ static int labpc_eeprom_write_insn(struct comedi_device * dev, struct comedi_sub
} }
// utility function that suggests a dma transfer size in bytes // 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 size;
unsigned int freq; unsigned int freq;
@ -1704,7 +1704,7 @@ static unsigned int labpc_suggest_transfer_size(comedi_cmd cmd)
} }
// figures out what counter values to use based on command // 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 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 const int min_counter_value = 2; // min value for 16 bit counter in mode 2

Просмотреть файл

@ -198,7 +198,7 @@ static int ni_dio_insn_config(struct comedi_device * dev, struct comedi_subdevic
static int ni_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s, static int ni_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static int ni_cdio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int ni_cdio_cancel(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); static void handle_cdio_interrupt(struct comedi_device * dev);
@ -275,7 +275,7 @@ static int ni_gpct_insn_config(struct comedi_device * dev, struct comedi_subdevi
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static int ni_gpct_cmd(struct comedi_device * dev, struct comedi_subdevice * s); 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, 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 int ni_gpct_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
static void handle_gpct_interrupt(struct comedi_device * dev, static void handle_gpct_interrupt(struct comedi_device * dev,
unsigned short counter_index); unsigned short counter_index);
@ -1207,7 +1207,7 @@ static void ni_mio_print_status_b(int status)
static void ni_ao_fifo_load(struct comedi_device * dev, struct comedi_subdevice * s, int n) static void ni_ao_fifo_load(struct comedi_device * dev, struct comedi_subdevice * s, int n)
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
int chan; int chan;
int i; int i;
short d; short d;
@ -2096,7 +2096,7 @@ static unsigned ni_min_ai_scan_period_ns(struct comedi_device * dev,
} }
static int ni_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int ni_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -2310,7 +2310,7 @@ static int ni_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s
static int ni_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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 timer;
int mode1 = 0; /* mode1 is needed for both stop and convert */ int mode1 = 0; /* mode1 is needed for both stop and convert */
int mode2 = 0; int mode2 = 0;
@ -3064,7 +3064,7 @@ static int ni_ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s
static int ni_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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 bits;
int i; int i;
unsigned trigvar; unsigned trigvar;
@ -3262,7 +3262,7 @@ static int ni_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
} }
static int ni_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int ni_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -3545,7 +3545,7 @@ static int ni_m_series_dio_insn_bits(struct comedi_device * dev, struct comedi_s
} }
static int ni_cdio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int ni_cdio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -3655,7 +3655,7 @@ static int ni_cdio_cmdtest(struct comedi_device * dev, struct comedi_subdevice *
static int ni_cdio_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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; unsigned cdo_mode_bits = CDO_FIFO_Mode_Bit | CDO_Halt_On_Error_Bit;
int retval; int retval;
@ -5096,7 +5096,7 @@ static int ni_gpct_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
int retval; int retval;
#ifdef PCIDMA #ifdef PCIDMA
struct ni_gpct *counter = s->private; 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, retval = ni_request_gpct_mite_channel(dev, counter->counter_index,
COMEDI_INPUT); COMEDI_INPUT);
@ -5115,7 +5115,7 @@ 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, static int ni_gpct_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
#ifdef PCIDMA #ifdef PCIDMA
struct ni_gpct *counter = s->private; struct ni_gpct *counter = s->private;

Просмотреть файл

@ -400,7 +400,7 @@ typedef struct {
#define devpriv ((nidio96_private *)dev->private) #define devpriv ((nidio96_private *)dev->private)
static int ni_pcidio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int ni_pcidio_inttrig(struct comedi_device * dev, struct comedi_subdevice * s, static int ni_pcidio_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
unsigned int trignum); unsigned int trignum);
@ -745,7 +745,7 @@ static int ni_pcidio_insn_bits(struct comedi_device * dev, struct comedi_subdevi
} }
static int ni_pcidio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int ni_pcidio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -878,7 +878,7 @@ static int ni_pcidio_ns_to_timer(int *nanosec, int round_mode)
static int ni_pcidio_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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 */ /* XXX configure ports for input */
writel(0x0000, devpriv->mite->daq_io_addr + Port_Pin_Directions(0)); writel(0x0000, devpriv->mite->daq_io_addr + Port_Pin_Directions(0));

Просмотреть файл

@ -146,7 +146,7 @@ extern int ni_tio_insn_config(struct ni_gpct *counter,
extern int ni_tio_winsn(struct ni_gpct *counter, extern int ni_tio_winsn(struct ni_gpct *counter,
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
extern int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async); 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 int ni_tio_cancel(struct ni_gpct *counter);
extern void ni_tio_handle_interrupt(struct ni_gpct *counter, extern void ni_tio_handle_interrupt(struct ni_gpct *counter,
struct comedi_subdevice * s); struct comedi_subdevice * s);

Просмотреть файл

@ -124,7 +124,7 @@ static int ni_tio_input_inttrig(struct comedi_device * dev, struct comedi_subdev
static int ni_tio_input_cmd(struct ni_gpct *counter, struct comedi_async *async) static int ni_tio_input_cmd(struct ni_gpct *counter, struct comedi_async *async)
{ {
struct ni_gpct_device *counter_dev = counter->counter_dev; struct ni_gpct_device *counter_dev = counter->counter_dev;
comedi_cmd *cmd = &async->cmd; struct comedi_cmd *cmd = &async->cmd;
int retval = 0; int retval = 0;
/* write alloc the entire buffer */ /* write alloc the entire buffer */
@ -183,7 +183,7 @@ static int ni_tio_output_cmd(struct ni_gpct *counter, struct comedi_async *async
static int ni_tio_cmd_setup(struct ni_gpct *counter, struct comedi_async *async) 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; int set_gate_source = 0;
unsigned gate_source; unsigned gate_source;
int retval = 0; int retval = 0;
@ -209,7 +209,7 @@ static int ni_tio_cmd_setup(struct ni_gpct *counter, struct comedi_async *async)
int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async) 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; int retval = 0;
unsigned long flags; unsigned long flags;
@ -232,7 +232,7 @@ int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async)
return retval; 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 err = 0;
int tmp; int tmp;

Просмотреть файл

@ -280,7 +280,7 @@ static int pcl711_ai_insn(struct comedi_device * dev, struct comedi_subdevice *
} }
static int pcl711_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int pcl711_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int tmp; int tmp;
int err = 0; int err = 0;
@ -384,7 +384,7 @@ static int pcl711_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
static int pcl711_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) static int pcl711_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
int timer1, timer2; int timer1, timer2;
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
pcl711_set_changain(dev, cmd->chanlist[0]); pcl711_set_changain(dev, cmd->chanlist[0]);

Просмотреть файл

@ -575,7 +575,7 @@ static int pcl812_do_insn_bits(struct comedi_device * dev, struct comedi_subdevi
/* /*
============================================================================== ==============================================================================
*/ */
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, rt_printk("pcl812 e=%d startsrc=%x scansrc=%x convsrc=%x\n", e,
cmd->start_src, cmd->scan_begin_src, cmd->convert_src); cmd->start_src, cmd->scan_begin_src, cmd->convert_src);
@ -592,7 +592,7 @@ static void pcl812_cmdtest_out(int e, comedi_cmd * cmd)
============================================================================== ==============================================================================
*/ */
static int pcl812_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int pcl812_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp, divisor1, divisor2; int tmp, divisor1, divisor2;
@ -773,7 +773,7 @@ static int pcl812_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
static int pcl812_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) static int pcl812_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
unsigned int divisor1 = 0, divisor2 = 0, i, dma_flags, bytes; 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 #ifdef PCL812_EXTDEBUG
rt_printk("pcl812 EDBG: BGN: pcl812_ai_cmd(...)\n"); rt_printk("pcl812 EDBG: BGN: pcl812_ai_cmd(...)\n");

Просмотреть файл

@ -219,7 +219,7 @@ static int set_rtc_irq_bit(unsigned char bit);
#endif #endif
static int pcl816_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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); static int pcl816_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
/* /*
@ -443,7 +443,7 @@ static irqreturn_t interrupt_pcl816(int irq, void *d PT_REGS_ARG)
============================================================================== ==============================================================================
COMMAND MODE 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, rt_printk("pcl816 e=%d startsrc=%x scansrc=%x convsrc=%x\n", e,
cmd->start_src, cmd->scan_begin_src, cmd->convert_src); cmd->start_src, cmd->scan_begin_src, cmd->convert_src);
@ -459,7 +459,7 @@ static void pcl816_cmdtest_out(int e, comedi_cmd * cmd)
============================================================================== ==============================================================================
*/ */
static int pcl816_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int pcl816_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp, divisor1, divisor2; int tmp, divisor1, divisor2;
@ -596,7 +596,7 @@ static int pcl816_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
static int pcl816_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) static int pcl816_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
unsigned int divisor1 = 0, divisor2 = 0, dma_flags, bytes, dmairq; 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) if (cmd->start_src != TRIG_NOW)
return -EINVAL; return -EINVAL;

Просмотреть файл

@ -955,7 +955,7 @@ static void pcl818_ai_mode13dma_rtc(int mode, struct comedi_device * dev,
static int pcl818_ai_cmd_mode(int mode, struct comedi_device * dev, static int pcl818_ai_cmd_mode(int mode, struct comedi_device * dev,
struct comedi_subdevice * s) struct comedi_subdevice * s)
{ {
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
int divisor1, divisor2; int divisor1, divisor2;
unsigned int seglen; unsigned int seglen;
@ -1252,7 +1252,7 @@ static int check_single_ended(unsigned int port)
============================================================================== ==============================================================================
*/ */
static int ai_cmdtest(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)
{ {
int err = 0; int err = 0;
int tmp, divisor1, divisor2; int tmp, divisor1, divisor2;
@ -1398,7 +1398,7 @@ static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
*/ */
static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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; int retval;
rt_printk("pcl818_ai_cmd()\n"); rt_printk("pcl818_ai_cmd()\n");

Просмотреть файл

@ -305,7 +305,7 @@ static void pcmmio_stop_intr(struct comedi_device *, struct comedi_subdevice *);
static int pcmmio_cancel(struct comedi_device * dev, struct comedi_subdevice * s); 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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int pcmmio_cmdtest(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 */ /* 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 */ static void init_asics(struct comedi_device * dev); /* sets up/clears ASIC chips to defaults */
@ -946,7 +946,7 @@ static int pcmmio_start_intr(struct comedi_device * dev, struct comedi_subdevice
} else { } else {
unsigned bits = 0, pol_bits = 0, n; unsigned bits = 0, pol_bits = 0, n;
int nports, firstport, asic, port; 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) if ((asic = subpriv->dio.intr.asic) < 0)
return 1; /* not an interrupt return 1; /* not an interrupt
@ -1039,7 +1039,7 @@ pcmmio_inttrig_start_intr(struct comedi_device * dev, struct comedi_subdevice *
*/ */
static int pcmmio_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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; unsigned long flags;
int event = 0; int event = 0;
@ -1082,7 +1082,7 @@ static int pcmmio_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
* 'do_cmdtest' function for an 'INTERRUPT' subdevice. * 'do_cmdtest' function for an 'INTERRUPT' subdevice.
*/ */
static int 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; int err = 0;
unsigned int tmp; unsigned int tmp;

Просмотреть файл

@ -263,7 +263,7 @@ static void pcmuio_stop_intr(struct comedi_device *, struct comedi_subdevice *);
static int pcmuio_cancel(struct comedi_device * dev, struct comedi_subdevice * s); 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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
static int pcmuio_cmdtest(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 */ /* 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 */ static void init_asics(struct comedi_device * dev); /* sets up/clears ASIC chips to defaults */
@ -866,7 +866,7 @@ static int pcmuio_start_intr(struct comedi_device * dev, struct comedi_subdevice
} else { } else {
unsigned bits = 0, pol_bits = 0, n; unsigned bits = 0, pol_bits = 0, n;
int nports, firstport, asic, port; int nports, firstport, asic, port;
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
if ((asic = subpriv->intr.asic) < 0) if ((asic = subpriv->intr.asic) < 0)
return 1; /* not an interrupt return 1; /* not an interrupt
@ -949,7 +949,7 @@ pcmuio_inttrig_start_intr(struct comedi_device * dev, struct comedi_subdevice *
*/ */
static int pcmuio_cmd(struct comedi_device * dev, struct comedi_subdevice * s) 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; unsigned long flags;
int event = 0; int event = 0;
@ -992,7 +992,7 @@ static int pcmuio_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
* 'do_cmdtest' function for an 'INTERRUPT' subdevice. * 'do_cmdtest' function for an 'INTERRUPT' subdevice.
*/ */
static int 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; int err = 0;
unsigned int tmp; unsigned int tmp;

Просмотреть файл

@ -468,7 +468,7 @@ static int daqp_ns_to_timer(unsigned int *ns, int round)
*/ */
static int daqp_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int daqp_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;
@ -596,7 +596,7 @@ static int daqp_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice *
static int daqp_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s) static int daqp_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
{ {
local_info_t *local = (local_info_t *) s->private; 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 counter = 100;
int scanlist_start_on_every_entry; int scanlist_start_on_every_entry;
int threshold; int threshold;

Просмотреть файл

@ -701,7 +701,7 @@ static int rtd_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice
static int rtd_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s, static int rtd_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data); comedi_insn *insn, unsigned int *data);
static int rtd_ai_cmdtest(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_cmd *cmd);
static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s); 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_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_poll (struct comedi_device *dev,struct comedi_subdevice *s); */
@ -1666,7 +1666,7 @@ static int rtd_ai_poll(struct comedi_device *dev, struct comedi_subdevice *s)
*/ */
static int rtd_ai_cmdtest(struct comedi_device *dev, 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 err = 0;
int tmp; int tmp;
@ -1872,7 +1872,7 @@ static int rtd_ai_cmdtest(struct comedi_device *dev,
*/ */
static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) 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; int timer;
/* stop anything currently running */ /* stop anything currently running */

Просмотреть файл

@ -229,7 +229,7 @@ static int s626_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice
comedi_insn *insn, unsigned int *data); comedi_insn *insn, unsigned int *data);
static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s); 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, 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_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
static int s626_ao_winsn(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); comedi_insn *insn, unsigned int *data);
@ -250,7 +250,7 @@ static int s626_enc_insn_read(struct comedi_device *dev, struct comedi_subdevice
static int s626_enc_insn_write(struct comedi_device *dev, struct comedi_subdevice *s, static int s626_enc_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_insn *insn, unsigned int *data); comedi_insn *insn, unsigned int *data);
static int s626_ns_to_timer(int *nanosec, int round_mode); 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, static int s626_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
unsigned int trignum); unsigned int trignum);
static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG); static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG);
@ -972,7 +972,7 @@ static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG)
{ {
struct comedi_device *dev = d; struct comedi_device *dev = d;
struct comedi_subdevice *s; struct comedi_subdevice *s;
comedi_cmd *cmd; struct comedi_cmd *cmd;
struct enc_private *k; struct enc_private *k;
unsigned long flags; unsigned long flags;
int32_t *readaddr; int32_t *readaddr;
@ -1318,7 +1318,7 @@ void ResetADC(struct comedi_device *dev, uint8_t *ppl)
uint16_t i; uint16_t i;
uint16_t n; uint16_t n;
uint32_t LocalPPL; 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. */ /* Stop RPS program in case it is currently running. */
MC_DISABLE(P_MC1, MC1_ERPS1); MC_DISABLE(P_MC1, MC1_ERPS1);
@ -1638,7 +1638,7 @@ static int s626_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice
return n; 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; int n;
@ -1677,7 +1677,7 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
{ {
uint8_t ppl[16]; uint8_t ppl[16];
comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
struct enc_private *k; struct enc_private *k;
int tick; int tick;
@ -1820,7 +1820,7 @@ 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, static int s626_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd) struct comedi_cmd *cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;

Просмотреть файл

@ -192,7 +192,7 @@ static int skel_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevic
static int skel_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s, static int skel_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data); comedi_insn * insn, unsigned int * data);
static int skel_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, 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_ns_to_timer(unsigned int *ns, int round);
/* /*
@ -347,7 +347,7 @@ static int skel_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s
} }
static int skel_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, static int skel_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_cmd * cmd) struct comedi_cmd * cmd)
{ {
int err = 0; int err = 0;
int tmp; int tmp;

Просмотреть файл

@ -897,7 +897,7 @@ static int usbduxsub_submit_OutURBs(struct usbduxsub *usbduxsub)
} }
static int usbdux_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, 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; int err = 0, tmp, i;
unsigned int tmpTimer; unsigned int tmpTimer;
@ -1162,7 +1162,7 @@ static int usbdux_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice
static int usbdux_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) 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; unsigned int chan, range;
int i, ret; int i, ret;
struct usbduxsub *this_usbduxsub = dev->private; struct usbduxsub *this_usbduxsub = dev->private;
@ -1451,7 +1451,7 @@ static int usbdux_ao_inttrig(struct comedi_device *dev, struct comedi_subdevice
} }
static int usbdux_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, static int usbdux_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
comedi_cmd *cmd) struct comedi_cmd *cmd)
{ {
int err = 0, tmp; int err = 0, tmp;
struct usbduxsub *this_usbduxsub = dev->private; struct usbduxsub *this_usbduxsub = dev->private;
@ -1591,7 +1591,7 @@ static int usbdux_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice
static int usbdux_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s) 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; unsigned int chan, gain;
int i, ret; int i, ret;
struct usbduxsub *this_usbduxsub = dev->private; struct usbduxsub *this_usbduxsub = dev->private;

Просмотреть файл

@ -578,7 +578,7 @@ int usbduxfastsub_submit_InURBs(struct usbduxfastsub_s *udfs)
} }
static int usbduxfast_ai_cmdtest(struct comedi_device *dev, 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; int err = 0, stop_mask = 0;
long int steps, tmp; long int steps, tmp;
@ -773,7 +773,7 @@ static int usbduxfast_ai_inttrig(struct comedi_device *dev,
static int usbduxfast_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) 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; unsigned int chan, gain, rngmask = 0xff;
int i, j, ret; int i, j, ret;
struct usbduxfastsub_s *udfs; struct usbduxfastsub_s *udfs;

Просмотреть файл

@ -121,7 +121,7 @@ int comedi_fileno(void *d)
return dev->minor; 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_device *dev = (struct comedi_device *) d;
struct comedi_subdevice *s; struct comedi_subdevice *s;
@ -161,7 +161,7 @@ int comedi_command(void *d, comedi_cmd *cmd)
return s->do_cmd(dev, 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_device *dev = (struct comedi_device *) d;
struct comedi_subdevice *s; struct comedi_subdevice *s;