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:
Родитель
b50d88d080
Коммит
ea6d0d4cab
|
@ -300,8 +300,8 @@ enum comedi_support_level {
|
|||
#define COMEDI_UNLOCK _IO(CIO, 6)
|
||||
#define COMEDI_CANCEL _IO(CIO, 7)
|
||||
#define COMEDI_RANGEINFO _IOR(CIO, 8, comedi_rangeinfo)
|
||||
#define COMEDI_CMD _IOR(CIO, 9, comedi_cmd)
|
||||
#define COMEDI_CMDTEST _IOR(CIO, 10, comedi_cmd)
|
||||
#define COMEDI_CMD _IOR(CIO, 9, struct comedi_cmd)
|
||||
#define COMEDI_CMDTEST _IOR(CIO, 10, struct comedi_cmd)
|
||||
#define COMEDI_INSNLIST _IOR(CIO, 11, comedi_insnlist)
|
||||
#define COMEDI_INSN _IOR(CIO, 12, comedi_insn)
|
||||
#define COMEDI_BUFCONFIG _IOR(CIO, 13, comedi_bufconfig)
|
||||
|
@ -310,7 +310,6 @@ enum comedi_support_level {
|
|||
|
||||
/* structures */
|
||||
|
||||
typedef struct comedi_cmd_struct comedi_cmd;
|
||||
typedef struct comedi_insn_struct comedi_insn;
|
||||
typedef struct comedi_insnlist_struct comedi_insnlist;
|
||||
typedef struct comedi_chaninfo_struct comedi_chaninfo;
|
||||
|
@ -351,7 +350,7 @@ struct comedi_insnlist_struct {
|
|||
comedi_insn *insns;
|
||||
};
|
||||
|
||||
struct comedi_cmd_struct {
|
||||
struct comedi_cmd {
|
||||
unsigned int subdev;
|
||||
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. */
|
||||
static int get_compat_cmd(comedi_cmd __user *cmd,
|
||||
static int get_compat_cmd(struct comedi_cmd __user *cmd,
|
||||
struct comedi32_cmd_struct __user *cmd32)
|
||||
{
|
||||
int err;
|
||||
|
@ -239,7 +239,7 @@ static int get_compat_cmd(comedi_cmd __user *cmd,
|
|||
}
|
||||
|
||||
/* Copy native cmd structure to 32-bit cmd structure. */
|
||||
static int put_compat_cmd(struct comedi32_cmd_struct __user *cmd32, comedi_cmd __user *cmd)
|
||||
static int put_compat_cmd(struct comedi32_cmd_struct __user *cmd32, struct comedi_cmd __user *cmd)
|
||||
{
|
||||
int err;
|
||||
unsigned int temp;
|
||||
|
@ -289,7 +289,7 @@ static int put_compat_cmd(struct comedi32_cmd_struct __user *cmd32, comedi_cmd _
|
|||
/* Handle 32-bit COMEDI_CMD ioctl. */
|
||||
static int compat_cmd(struct file *file, unsigned long arg)
|
||||
{
|
||||
comedi_cmd __user *cmd;
|
||||
struct comedi_cmd __user *cmd;
|
||||
struct comedi32_cmd_struct __user *cmd32;
|
||||
int rc;
|
||||
|
||||
|
@ -306,7 +306,7 @@ static int compat_cmd(struct file *file, unsigned long arg)
|
|||
/* Handle 32-bit COMEDI_CMDTEST ioctl. */
|
||||
static int compat_cmdtest(struct file *file, unsigned long arg)
|
||||
{
|
||||
comedi_cmd __user *cmd;
|
||||
struct comedi_cmd __user *cmd;
|
||||
struct comedi32_cmd_struct __user *cmd32;
|
||||
int rc, err;
|
||||
|
||||
|
|
|
@ -977,13 +977,13 @@ error:
|
|||
*/
|
||||
static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file)
|
||||
{
|
||||
comedi_cmd user_cmd;
|
||||
struct comedi_cmd user_cmd;
|
||||
struct comedi_subdevice *s;
|
||||
struct comedi_async *async;
|
||||
int ret = 0;
|
||||
unsigned int *chanlist_saver = NULL;
|
||||
|
||||
if (copy_from_user(&user_cmd, arg, sizeof(comedi_cmd))) {
|
||||
if (copy_from_user(&user_cmd, arg, sizeof(struct comedi_cmd))) {
|
||||
DPRINTK("bad cmd address\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
@ -1072,7 +1072,7 @@ static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file)
|
|||
/* restore chanlist pointer before copying back */
|
||||
user_cmd.chanlist = chanlist_saver;
|
||||
user_cmd.data = NULL;
|
||||
if (copy_to_user(arg, &user_cmd, sizeof(comedi_cmd))) {
|
||||
if (copy_to_user(arg, &user_cmd, sizeof(struct comedi_cmd))) {
|
||||
DPRINTK("fault writing cmd\n");
|
||||
ret = -EFAULT;
|
||||
goto cleanup;
|
||||
|
@ -1131,13 +1131,13 @@ cleanup:
|
|||
*/
|
||||
static int do_cmdtest_ioctl(struct comedi_device *dev, void *arg, void *file)
|
||||
{
|
||||
comedi_cmd user_cmd;
|
||||
struct comedi_cmd user_cmd;
|
||||
struct comedi_subdevice *s;
|
||||
int ret = 0;
|
||||
unsigned int *chanlist = NULL;
|
||||
unsigned int *chanlist_saver = NULL;
|
||||
|
||||
if (copy_from_user(&user_cmd, arg, sizeof(comedi_cmd))) {
|
||||
if (copy_from_user(&user_cmd, arg, sizeof(struct comedi_cmd))) {
|
||||
DPRINTK("bad cmd address\n");
|
||||
return -EFAULT;
|
||||
}
|
||||
|
@ -1201,7 +1201,7 @@ static int do_cmdtest_ioctl(struct comedi_device *dev, void *arg, void *file)
|
|||
/* restore chanlist pointer before copying back */
|
||||
user_cmd.chanlist = chanlist_saver;
|
||||
|
||||
if (copy_to_user(arg, &user_cmd, sizeof(comedi_cmd))) {
|
||||
if (copy_to_user(arg, &user_cmd, sizeof(struct comedi_cmd))) {
|
||||
DPRINTK("bad cmd address\n");
|
||||
ret = -EFAULT;
|
||||
goto cleanup;
|
||||
|
|
|
@ -165,7 +165,7 @@ struct comedi_subdevice {
|
|||
unsigned int *);
|
||||
|
||||
int (*do_cmd) (struct comedi_device *, struct comedi_subdevice *);
|
||||
int (*do_cmdtest) (struct comedi_device *, struct comedi_subdevice *, comedi_cmd *);
|
||||
int (*do_cmdtest) (struct comedi_device *, struct comedi_subdevice *, struct comedi_cmd *);
|
||||
int (*poll) (struct comedi_device *, struct comedi_subdevice *);
|
||||
int (*cancel) (struct comedi_device *, struct comedi_subdevice *);
|
||||
/* int (*do_lock)(struct comedi_device *,struct comedi_subdevice *); */
|
||||
|
@ -221,7 +221,7 @@ struct comedi_async {
|
|||
|
||||
unsigned int events; /* events that have occurred */
|
||||
|
||||
comedi_cmd cmd;
|
||||
struct comedi_cmd cmd;
|
||||
|
||||
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,
|
||||
unsigned int mask, int (*cb) (unsigned int, void *), void *arg);
|
||||
|
||||
int comedi_command(void *dev, comedi_cmd *cmd);
|
||||
int comedi_command_test(void *dev, comedi_cmd *cmd);
|
||||
int comedi_command(void *dev, struct comedi_cmd *cmd);
|
||||
int comedi_command_test(void *dev, struct comedi_cmd *cmd);
|
||||
int comedi_trigger(void *dev, unsigned int subdev, struct comedi_trig *it);
|
||||
int __comedi_trigger(void *dev, unsigned int subdev, struct comedi_trig *it);
|
||||
int comedi_data_write(void *dev, unsigned int subdev, unsigned int chan,
|
||||
|
@ -137,8 +137,8 @@ int comedi_cancel(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);
|
||||
|
||||
int comedi_command(unsigned int minor, comedi_cmd *cmd);
|
||||
int comedi_command_test(unsigned int minor, comedi_cmd *cmd);
|
||||
int comedi_command(unsigned int minor, struct comedi_cmd *cmd);
|
||||
int comedi_command_test(unsigned int minor, struct comedi_cmd *cmd);
|
||||
int comedi_trigger(unsigned int minor, unsigned int subdev, struct comedi_trig *it);
|
||||
int __comedi_trigger(unsigned int minor, unsigned int subdev, struct comedi_trig *it);
|
||||
int comedi_data_write(unsigned int dev, unsigned int subdev, unsigned int chan,
|
||||
|
|
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int tmp;
|
||||
|
|
|
@ -135,7 +135,7 @@ typedef struct {
|
|||
unsigned int *data);
|
||||
int (*i_hwdrv_CommandTestAnalogInput)(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
comedi_cmd *cmd);
|
||||
struct comedi_cmd *cmd);
|
||||
int (*i_hwdrv_CommandAnalogInput)(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s);
|
||||
int (*i_hwdrv_CancelAnalogInput)(struct comedi_device *dev,
|
||||
|
|
|
@ -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|
|
||||
| ,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 |
|
||||
|
@ -469,7 +469,7 @@ int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_s
|
|||
+----------------------------------------------------------------------------+
|
||||
| Input Parameters : struct comedi_device *dev |
|
||||
| struct comedi_subdevice *s |
|
||||
| comedi_cmd *cmd |
|
||||
| struct comedi_cmd *cmd |
|
||||
+----------------------------------------------------------------------------+
|
||||
| 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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
//loading private structure with cmd structure inputs
|
||||
devpriv->ui_AiFlags = cmd->flags;
|
||||
|
|
|
@ -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,
|
||||
comedi_insn *insn, unsigned int *data);
|
||||
int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
comedi_cmd *cmd);
|
||||
struct comedi_cmd *cmd);
|
||||
int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
//int i_APCI3120_CancelAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
|
|
|
@ -2539,7 +2539,7 @@ INT i_APCI3200_InsnWriteReleaseAnalogInput(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 |
|
||||
|
@ -2548,7 +2548,7 @@ INT i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device * dev,
|
|||
+----------------------------------------------------------------------------+
|
||||
| Input Parameters : struct comedi_device *dev |
|
||||
| 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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
UINT ui_Configuration = 0;
|
||||
//INT i_CurrentSource = 0;
|
||||
UINT ui_Trigger = 0;
|
||||
|
|
|
@ -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_InterruptHandleEos(struct comedi_device *dev);
|
||||
INT i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
comedi_cmd *cmd);
|
||||
struct comedi_cmd *cmd);
|
||||
INT i_APCI3200_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
INT i_APCI3200_ReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
comedi_insn *insn, unsigned int *data);
|
||||
|
|
|
@ -558,7 +558,7 @@ static int pci9111_ai_cancel(struct comedi_device * dev, struct comedi_subdevice
|
|||
|
||||
static int
|
||||
pci9111_ai_do_cmd_test(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, comedi_cmd * cmd)
|
||||
struct comedi_subdevice * s, struct comedi_cmd * cmd)
|
||||
{
|
||||
int tmp;
|
||||
int error = 0;
|
||||
|
@ -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)
|
||||
{
|
||||
comedi_cmd *async_cmd = &subdevice->async->cmd;
|
||||
struct comedi_cmd *async_cmd = &subdevice->async->cmd;
|
||||
|
||||
if (!dev->irq) {
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int addchans = 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,
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
DPRINTK("adv_pci1710 EDBG: BGN: pci171x_ai_cmd(...)\n");
|
||||
devpriv->ai_n_chan = cmd->chanlist_len;
|
||||
|
|
|
@ -610,7 +610,7 @@ static int dio200_start_intr(struct comedi_device * dev, struct comedi_subdevice
|
|||
unsigned int n;
|
||||
unsigned isn_bits;
|
||||
dio200_subdev_intr *subpriv = s->private;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int retval = 0;
|
||||
|
||||
if (!subpriv->continuous && subpriv->stopcount == 0) {
|
||||
|
@ -802,7 +802,7 @@ static int dio200_subdev_intr_cancel(struct comedi_device * dev, struct comedi_s
|
|||
*/
|
||||
static int
|
||||
dio200_subdev_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int tmp;
|
||||
|
@ -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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
dio200_subdev_intr *subpriv = s->private;
|
||||
unsigned long flags;
|
||||
int event = 0;
|
||||
|
|
|
@ -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,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int pc236_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int pc236_intr_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static irqreturn_t pc236_interrupt(int irq, void *d PT_REGS_ARG);
|
||||
|
@ -540,7 +540,7 @@ static int pc236_intr_insn(struct comedi_device * dev, struct comedi_subdevice *
|
|||
* Copied from the comedi_parport driver.
|
||||
*/
|
||||
static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned long flags;
|
||||
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int num_scans;
|
||||
unsigned int room;
|
||||
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.
|
||||
*/
|
||||
static int
|
||||
pci224_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comedi_cmd * cmd)
|
||||
pci224_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int tmp;
|
||||
|
@ -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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int range;
|
||||
unsigned int i, j;
|
||||
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_subdevice *s = &dev->subdevices[0];
|
||||
comedi_cmd *cmd;
|
||||
struct comedi_cmd *cmd;
|
||||
unsigned char intstat, valid_intstat;
|
||||
unsigned char curenab;
|
||||
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 irqreturn_t pci230_interrupt(int irq, void *d PT_REGS_ARG);
|
||||
static int pci230_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int pci230_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int pci230_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void pci230_ao_stop(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void pci230_handle_ao_nofifo(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int pci230_handle_ao_fifo(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int pci230_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int pci230_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int pci230_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void pci230_ai_stop(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned long irqflags;
|
||||
|
||||
set_bit(AO_CMD_STARTED, &devpriv->state);
|
||||
|
@ -1554,7 +1554,7 @@ static int pci230_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s
|
|||
unsigned int range;
|
||||
|
||||
/* Get the command. */
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
if (cmd->scan_begin_src == TRIG_TIMER) {
|
||||
/* Claim Z2-CT1. */
|
||||
|
@ -1624,7 +1624,7 @@ static int pci230_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int pci230_ai_check_scan_period(comedi_cmd * cmd)
|
||||
static int pci230_ai_check_scan_period(struct comedi_cmd * cmd)
|
||||
{
|
||||
unsigned int min_scan_period, chanlist_len;
|
||||
int err = 0;
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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,
|
||||
struct comedi_subdevice * s)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int scanlen = cmd->scan_end_arg;
|
||||
unsigned int wake;
|
||||
unsigned short triglev;
|
||||
|
@ -2148,7 +2148,7 @@ static void pci230_ai_start(struct comedi_device * dev, struct comedi_subdevice
|
|||
unsigned long irqflags;
|
||||
unsigned short conv;
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
|
||||
set_bit(AI_CMD_STARTED, &devpriv->state);
|
||||
if (!devpriv->ai_continuous && (devpriv->ai_scan_count == 0)) {
|
||||
|
@ -2301,7 +2301,7 @@ static int pci230_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s
|
|||
|
||||
/* Get the command. */
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
|
||||
/*
|
||||
* Determine which shared resources are needed.
|
||||
|
@ -2627,7 +2627,7 @@ static void pci230_handle_ao_nofifo(struct comedi_device * dev, struct comedi_su
|
|||
short data;
|
||||
int i, ret;
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
|
||||
if (!devpriv->ao_continuous && (devpriv->ao_scan_count == 0)) {
|
||||
return;
|
||||
|
@ -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)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned int num_scans;
|
||||
unsigned int room;
|
||||
unsigned short dacstat;
|
||||
|
@ -2866,7 +2866,7 @@ static void pci230_ao_stop(struct comedi_device * dev, struct comedi_subdevice *
|
|||
unsigned long irqflags;
|
||||
unsigned char intsrc;
|
||||
int started;
|
||||
comedi_cmd *cmd;
|
||||
struct comedi_cmd *cmd;
|
||||
|
||||
comedi_spin_lock_irqsave(&devpriv->ao_stop_spinlock, irqflags);
|
||||
started = test_and_clear_bit(AO_CMD_STARTED, &devpriv->state);
|
||||
|
@ -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)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
comedi_cmd *cmd;
|
||||
struct comedi_cmd *cmd;
|
||||
int started;
|
||||
|
||||
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);
|
||||
static int das16cs_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int das16cs_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int das16cs_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
static int das16cs_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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);
|
||||
static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int cb_pcidas_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int cb_pcidas_ao_inttrig(struct comedi_device *dev,
|
||||
struct comedi_subdevice *subdev,
|
||||
unsigned int trig_num);
|
||||
static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static irqreturn_t cb_pcidas_interrupt(int irq, void *d PT_REGS_ARG);
|
||||
static void handle_ao_interrupt(struct comedi_device * dev, unsigned int status);
|
||||
static int cb_pcidas_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned int bits;
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned int i;
|
||||
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;
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned long flags;
|
||||
|
||||
if (trig_num != 0)
|
||||
|
@ -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_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned int half_fifo = thisboard->fifo_size / 2;
|
||||
unsigned int num_points;
|
||||
unsigned int flags;
|
||||
|
|
|
@ -1144,12 +1144,12 @@ static int ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice
|
|||
comedi_insn * insn, unsigned int * data);
|
||||
static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * subdev,
|
||||
unsigned int trig_num);
|
||||
static int ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG);
|
||||
static int ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
|
@ -1175,7 +1175,7 @@ static int ad8402_write_insn(struct comedi_device * dev, struct comedi_subdevice
|
|||
comedi_insn * insn, unsigned int * data);
|
||||
static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
static void check_adc_timing(struct comedi_device * dev, comedi_cmd * cmd);
|
||||
static void check_adc_timing(struct comedi_device * dev, struct comedi_cmd * cmd);
|
||||
static unsigned int get_divisor(unsigned int ns, unsigned int flags);
|
||||
static void i2c_write(struct comedi_device * dev, unsigned int address,
|
||||
const uint8_t * data, unsigned int length);
|
||||
|
@ -1194,9 +1194,9 @@ static int set_ai_fifo_segment_length(struct comedi_device * dev,
|
|||
unsigned int num_entries);
|
||||
static void disable_ai_pacing(struct comedi_device * dev);
|
||||
static void disable_ai_interrupts(struct comedi_device * dev);
|
||||
static void enable_ai_interrupts(struct comedi_device * dev, const comedi_cmd * cmd);
|
||||
static void enable_ai_interrupts(struct comedi_device * dev, const struct comedi_cmd * cmd);
|
||||
static unsigned int get_ao_divisor(unsigned int ns, unsigned int flags);
|
||||
static void load_ao_dma(struct comedi_device * dev, const comedi_cmd * cmd);
|
||||
static void load_ao_dma(struct comedi_device * dev, const struct comedi_cmd * cmd);
|
||||
|
||||
COMEDI_PCI_INITCLEANUP(driver_cb_pcidas, pcidas64_pci_table);
|
||||
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
|
@ -2313,7 +2313,7 @@ static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int use_hw_sample_counter(comedi_cmd * cmd)
|
||||
static int use_hw_sample_counter(struct comedi_cmd * cmd)
|
||||
{
|
||||
// disable for now until I work out a race
|
||||
return 0;
|
||||
|
@ -2324,7 +2324,7 @@ static int use_hw_sample_counter(comedi_cmd * cmd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void setup_sample_counters(struct comedi_device * dev, comedi_cmd * cmd)
|
||||
static void setup_sample_counters(struct comedi_device * dev, struct comedi_cmd * cmd)
|
||||
{
|
||||
if (cmd->stop_src == TRIG_COUNT) {
|
||||
// set software count
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
static void enable_ai_interrupts(struct comedi_device * dev, const comedi_cmd * cmd)
|
||||
static void enable_ai_interrupts(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
{
|
||||
uint32_t bits;
|
||||
unsigned long flags;
|
||||
|
@ -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,
|
||||
const comedi_cmd * cmd)
|
||||
const struct comedi_cmd * cmd)
|
||||
{
|
||||
// supposed to load counter with desired divisor minus 3
|
||||
return cmd->convert_arg / TIMER_BASE - 3;
|
||||
}
|
||||
|
||||
static uint32_t ai_scan_counter_6xxx(struct comedi_device * dev, comedi_cmd * cmd)
|
||||
static uint32_t ai_scan_counter_6xxx(struct comedi_device * dev, struct comedi_cmd * cmd)
|
||||
{
|
||||
uint32_t count;
|
||||
// figure out how long we need to delay at end of scan
|
||||
|
@ -2435,7 +2435,7 @@ static uint32_t ai_scan_counter_6xxx(struct comedi_device * dev, comedi_cmd * cm
|
|||
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;
|
||||
|
||||
|
@ -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,
|
||||
const comedi_cmd * cmd)
|
||||
const struct comedi_cmd * cmd)
|
||||
{
|
||||
// select internal/external master clock
|
||||
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);
|
||||
}
|
||||
|
||||
static void select_master_clock(struct comedi_device * dev, const comedi_cmd * cmd)
|
||||
static void select_master_clock(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
{
|
||||
switch (board(dev)->layout) {
|
||||
case LAYOUT_4020:
|
||||
|
@ -2503,7 +2503,7 @@ static inline void dma_start_sync(struct comedi_device * dev, unsigned int chann
|
|||
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;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
static int use_internal_queue_6xxx(const comedi_cmd * cmd)
|
||||
static int use_internal_queue_6xxx(const struct comedi_cmd * cmd)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i + 1 < cmd->chanlist_len; i++) {
|
||||
|
@ -2550,7 +2550,7 @@ static int use_internal_queue_6xxx(const comedi_cmd * cmd)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int setup_channel_queue(struct comedi_device * dev, const comedi_cmd * cmd)
|
||||
static int setup_channel_queue(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
{
|
||||
unsigned short bits;
|
||||
int i;
|
||||
|
@ -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)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
uint32_t bits;
|
||||
unsigned int i;
|
||||
unsigned long flags;
|
||||
|
@ -2801,7 +2801,7 @@ static void pio_drain_ai_fifo_16(struct comedi_device * dev)
|
|||
{
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned int i;
|
||||
uint16_t prepost_bits;
|
||||
int read_segment, read_index, write_segment, write_index;
|
||||
|
@ -2868,7 +2868,7 @@ static void pio_drain_ai_fifo_32(struct comedi_device * dev)
|
|||
{
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned int i;
|
||||
unsigned int max_transfer = 100000;
|
||||
uint32_t fifo_data;
|
||||
|
@ -2957,7 +2957,7 @@ void handle_ai_interrupt(struct comedi_device * dev, unsigned short status,
|
|||
{
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
uint8_t dma1_status;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -3036,7 +3036,7 @@ static int last_ao_dma_load_completed(struct comedi_device * dev)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int ao_stopped_by_error(struct comedi_device * dev, const comedi_cmd * cmd)
|
||||
static int ao_stopped_by_error(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
{
|
||||
if (cmd->stop_src == TRIG_NONE)
|
||||
return 1;
|
||||
|
@ -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_async *async;
|
||||
comedi_cmd *cmd;
|
||||
struct comedi_cmd *cmd;
|
||||
uint8_t dma0_status;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -3232,7 +3232,7 @@ static int ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice
|
|||
return 1;
|
||||
}
|
||||
|
||||
static void set_dac_control0_reg(struct comedi_device * dev, const comedi_cmd * cmd)
|
||||
static void set_dac_control0_reg(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
{
|
||||
unsigned int bits = DAC_ENABLE_BIT | WAVEFORM_GATE_LEVEL_BIT |
|
||||
WAVEFORM_GATE_ENABLE_BIT | WAVEFORM_GATE_SELECT_BIT;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -3269,7 +3269,7 @@ static void set_dac_control1_reg(struct comedi_device * dev, const comedi_cmd *
|
|||
priv(dev)->main_iobase + DAC_CONTROL1_REG);
|
||||
}
|
||||
|
||||
static void set_dac_select_reg(struct comedi_device * dev, const comedi_cmd * cmd)
|
||||
static void set_dac_select_reg(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
{
|
||||
uint16_t bits;
|
||||
unsigned int first_channel, last_channel;
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -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,
|
||||
const comedi_cmd * cmd)
|
||||
const struct comedi_cmd * cmd)
|
||||
{
|
||||
unsigned int num_bytes, buffer_index, prev_buffer_index;
|
||||
unsigned int next_bits;
|
||||
|
@ -3346,7 +3346,7 @@ static unsigned int load_ao_dma_buffer(struct comedi_device * dev,
|
|||
return num_bytes;
|
||||
}
|
||||
|
||||
static void load_ao_dma(struct comedi_device * dev, const comedi_cmd * cmd)
|
||||
static void load_ao_dma(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
{
|
||||
unsigned int num_bytes;
|
||||
unsigned int next_transfer_addr;
|
||||
|
@ -3368,7 +3368,7 @@ static void load_ao_dma(struct comedi_device * dev, const comedi_cmd * cmd)
|
|||
} while (num_bytes >= DMA_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
static int prep_ao_dma(struct comedi_device * dev, const comedi_cmd * cmd)
|
||||
static int prep_ao_dma(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
{
|
||||
unsigned int num_bytes;
|
||||
int i;
|
||||
|
@ -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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
if (external_ai_queue_in_use(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,
|
||||
unsigned int trig_num)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int retval;
|
||||
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
|
@ -3851,7 +3851,7 @@ static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice
|
|||
* sets cmd members appropriately.
|
||||
* adc paces conversions from master clock by dividing by (x + 3) where x is 24 bit number
|
||||
*/
|
||||
static void check_adc_timing(struct comedi_device * dev, comedi_cmd * cmd)
|
||||
static void check_adc_timing(struct comedi_device *dev, struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int convert_divisor = 0, scan_divisor;
|
||||
static const int min_convert_divisor = 3;
|
||||
|
|
|
@ -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,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
//static int cb_pcidda_ai_cmd(struct comedi_device *dev,struct comedi_subdevice *s);
|
||||
//static int cb_pcidda_ai_cmdtest(struct comedi_device *dev,struct comedi_subdevice *s, comedi_cmd *cmd);
|
||||
//static int cb_pcidda_ai_cmdtest(struct comedi_device *dev,struct comedi_subdevice *s, struct comedi_cmd *cmd);
|
||||
//static int cb_pcidda_ns_to_timer(unsigned int *ns,int round);
|
||||
static unsigned int cb_pcidda_serial_in(struct comedi_device * dev);
|
||||
static void cb_pcidda_serial_out(struct comedi_device * dev, unsigned int value,
|
||||
|
@ -433,7 +433,7 @@ static int cb_pcidda_ai_cmd(struct comedi_device * dev, struct comedi_subdevice
|
|||
|
||||
#if 0
|
||||
static int cb_pcidda_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
|
|
|
@ -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,
|
||||
comedi_cmd *cmd)
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
|
|
|
@ -145,7 +145,7 @@ typedef struct {
|
|||
RT_TASK *scan_task; // rt task that controls conversion timing in a scan
|
||||
/* io_function can point to either an input or output function
|
||||
* depending on what kind of subdevice we are emulating for */
|
||||
int (*io_function) (struct comedi_device * dev, comedi_cmd * cmd,
|
||||
int (*io_function) (struct comedi_device * dev, struct comedi_cmd * cmd,
|
||||
unsigned int index);
|
||||
// RTIME has units of 1 = 838 nanoseconds
|
||||
// time at which first scan started, used to check scan timing
|
||||
|
@ -156,8 +156,8 @@ typedef struct {
|
|||
RTIME convert_period;
|
||||
// flags
|
||||
volatile int stop; // indicates we should stop
|
||||
volatile int rt_task_active; // indicates rt_task is servicing a comedi_cmd
|
||||
volatile int scan_task_active; // indicates scan_task is servicing a comedi_cmd
|
||||
volatile int rt_task_active; // indicates rt_task is servicing a struct comedi_cmd
|
||||
volatile int scan_task_active; // indicates scan_task is servicing a struct comedi_cmd
|
||||
unsigned timer_running:1;
|
||||
} timer_private;
|
||||
#define devpriv ((timer_private *)dev->private)
|
||||
|
@ -206,7 +206,7 @@ inline static int check_conversion_timing(struct comedi_device * dev,
|
|||
}
|
||||
|
||||
// devpriv->io_function for an input subdevice
|
||||
static int timer_data_read(struct comedi_device * dev, comedi_cmd * cmd,
|
||||
static int timer_data_read(struct comedi_device * dev, struct comedi_cmd * cmd,
|
||||
unsigned int index)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
|
@ -231,7 +231,7 @@ static int timer_data_read(struct comedi_device * dev, comedi_cmd * cmd,
|
|||
}
|
||||
|
||||
// devpriv->io_function for an output subdevice
|
||||
static int timer_data_write(struct comedi_device * dev, comedi_cmd * cmd,
|
||||
static int timer_data_write(struct comedi_device * dev, struct comedi_cmd * cmd,
|
||||
unsigned int index)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->write_subdev;
|
||||
|
@ -266,7 +266,7 @@ static int timer_data_write(struct comedi_device * dev, comedi_cmd * cmd,
|
|||
}
|
||||
|
||||
// devpriv->io_function for DIO subdevices
|
||||
static int timer_dio_read(struct comedi_device * dev, comedi_cmd * cmd,
|
||||
static int timer_dio_read(struct comedi_device * dev, struct comedi_cmd * cmd,
|
||||
unsigned int index)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
|
@ -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_subdevice *s = dev->subdevices + 0;
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
int i, ret;
|
||||
unsigned long long n;
|
||||
RTIME scan_start;
|
||||
|
||||
// every comedi_cmd causes one execution of while loop
|
||||
// every struct comedi_cmd causes one execution of while loop
|
||||
while (1) {
|
||||
devpriv->scan_task_active = 1;
|
||||
// each for loop completes one scan
|
||||
|
@ -353,7 +353,7 @@ static void scan_task_func(comedi_rt_task_context_t d)
|
|||
comedi_event(dev, s);
|
||||
async->events = 0;
|
||||
devpriv->scan_task_active = 0;
|
||||
// suspend task until next comedi_cmd
|
||||
// suspend task until next struct comedi_cmd
|
||||
rt_task_suspend(devpriv->scan_task);
|
||||
}
|
||||
}
|
||||
|
@ -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_subdevice *s = dev->subdevices + 0;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int ret;
|
||||
unsigned long long n;
|
||||
|
||||
// every comedi_cmd causes one execution of while loop
|
||||
// every struct comedi_cmd causes one execution of while loop
|
||||
while (1) {
|
||||
devpriv->rt_task_active = 1;
|
||||
devpriv->scan_task_active = 1;
|
||||
|
@ -391,7 +391,7 @@ static void timer_task_func(comedi_rt_task_context_t d)
|
|||
cleanup:
|
||||
|
||||
devpriv->rt_task_active = 0;
|
||||
// suspend until next comedi_cmd
|
||||
// suspend until next struct comedi_cmd
|
||||
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);
|
||||
}
|
||||
|
||||
static int cmdtest_helper(comedi_cmd * cmd,
|
||||
static int cmdtest_helper(struct comedi_cmd * cmd,
|
||||
unsigned int start_src,
|
||||
unsigned int scan_begin_src,
|
||||
unsigned int convert_src,
|
||||
|
@ -445,7 +445,7 @@ static int cmdtest_helper(comedi_cmd * cmd,
|
|||
}
|
||||
|
||||
static int timer_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int start_src = 0;
|
||||
|
@ -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)
|
||||
{
|
||||
int ret;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
/* hack attack: drivers are not supposed to do this: */
|
||||
dev->rt = 1;
|
||||
|
||||
// make sure tasks have finished cleanup of last comedi_cmd
|
||||
// make sure tasks have finished cleanup of last struct comedi_cmd
|
||||
if (devpriv->rt_task_active || devpriv->scan_task_active)
|
||||
return -EBUSY;
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
RTIME now, delay, period;
|
||||
int ret;
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ static struct comedi_driver driver_waveform = {
|
|||
COMEDI_INITCLEANUP(driver_waveform);
|
||||
|
||||
static int waveform_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
comedi_cmd *cmd);
|
||||
struct comedi_cmd *cmd);
|
||||
static int waveform_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
static int waveform_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
static int waveform_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
|
@ -145,7 +145,7 @@ static void waveform_ai_interrupt(unsigned long arg)
|
|||
{
|
||||
struct comedi_device *dev = (struct comedi_device *) arg;
|
||||
struct comedi_async *async = dev->read_subdev->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned int i, j;
|
||||
/* all times in microsec */
|
||||
unsigned long elapsed_time;
|
||||
|
@ -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,
|
||||
comedi_cmd *cmd)
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
if (cmd->flags & TRIG_RT) {
|
||||
comedi_error(dev,
|
||||
|
|
|
@ -92,7 +92,7 @@ static int contec_do_insn_bits(struct comedi_device * dev, struct comedi_subdevi
|
|||
|
||||
#if 0
|
||||
static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
|
||||
static int contec_ns_to_timer(unsigned int *ns, int round);
|
||||
#endif
|
||||
|
@ -180,7 +180,7 @@ static int contec_detach(struct comedi_device * dev)
|
|||
|
||||
#if 0
|
||||
static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
printk("contec_cmdtest called\n");
|
||||
return 0;
|
||||
|
|
|
@ -336,7 +336,7 @@ static int das16_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice *
|
|||
comedi_insn * insn, unsigned int * data);
|
||||
|
||||
static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int das16_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int das16_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void das16_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
|
@ -351,7 +351,7 @@ static unsigned int das16_set_pacer(struct comedi_device * dev, unsigned int ns,
|
|||
int flags);
|
||||
static int das1600_mode_detect(struct comedi_device * dev);
|
||||
static unsigned int das16_suggest_transfer_size(struct comedi_device * dev,
|
||||
comedi_cmd cmd);
|
||||
struct comedi_cmd cmd);
|
||||
|
||||
static void reg_dump(struct comedi_device * dev);
|
||||
|
||||
|
@ -743,7 +743,7 @@ struct das16_private_struct {
|
|||
#define thisboard ((struct das16_board_struct *)(dev->board_ptr))
|
||||
|
||||
static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0, tmp;
|
||||
int gain, start_chan, i;
|
||||
|
@ -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)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned int byte;
|
||||
unsigned long flags;
|
||||
int range;
|
||||
|
@ -1202,7 +1202,7 @@ static void das16_interrupt(struct comedi_device * dev)
|
|||
unsigned long dma_flags, spin_flags;
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
struct comedi_async *async;
|
||||
comedi_cmd *cmd;
|
||||
struct comedi_cmd *cmd;
|
||||
int num_bytes, residue;
|
||||
int buffer_index;
|
||||
|
||||
|
@ -1675,7 +1675,7 @@ COMEDI_INITCLEANUP(driver_das16);
|
|||
|
||||
// utility function that suggests a dma transfer size in bytes
|
||||
static unsigned int das16_suggest_transfer_size(struct comedi_device * dev,
|
||||
comedi_cmd cmd)
|
||||
struct comedi_cmd cmd)
|
||||
{
|
||||
unsigned int size;
|
||||
unsigned int freq;
|
||||
|
|
|
@ -38,7 +38,7 @@ significantly different.
|
|||
|
||||
I was _barely_ able to reach the full 1 MHz capability
|
||||
of this board, using a hard real-time interrupt
|
||||
(set the TRIG_RT flag in your comedi_cmd and use
|
||||
(set the TRIG_RT flag in your struct comedi_cmd and use
|
||||
rtlinux or RTAI). The board can't do dma, so the bottleneck is
|
||||
pulling the data across the ISA bus. I timed the interrupt
|
||||
handler, and it took my computer ~470 microseconds to pull 512
|
||||
|
@ -139,7 +139,7 @@ static int das16m1_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice
|
|||
comedi_insn * insn, unsigned int * data);
|
||||
|
||||
static int das16m1_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int das16m1_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
|
||||
|
@ -201,7 +201,7 @@ static inline short munge_sample(short data)
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned int byte, i;
|
||||
|
||||
if (dev->irq == 0) {
|
||||
|
@ -518,7 +518,7 @@ static void das16m1_handler(struct comedi_device * dev, unsigned int status)
|
|||
{
|
||||
struct comedi_subdevice *s;
|
||||
struct comedi_async *async;
|
||||
comedi_cmd *cmd;
|
||||
struct comedi_cmd *cmd;
|
||||
u16 num_samples;
|
||||
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,
|
||||
struct comedi_subdevice * s);
|
||||
static int das1800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int das1800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int das1800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
|
@ -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 unsigned int burst_convert_arg(unsigned int convert_arg, int round_mode);
|
||||
static unsigned int suggest_transfer_size(comedi_cmd * cmd);
|
||||
static unsigned int suggest_transfer_size(struct comedi_cmd * cmd);
|
||||
|
||||
// analog input ranges
|
||||
static const struct comedi_lrange range_ai_das1801 = {
|
||||
|
@ -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_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned int status = inb(dev->iobase + DAS1800_STATUS);
|
||||
|
||||
async->events = 0;
|
||||
|
@ -1027,7 +1027,7 @@ static void das1800_flush_dma_channel(struct comedi_device * dev, struct comedi_
|
|||
unsigned int channel, uint16_t * buffer)
|
||||
{
|
||||
unsigned int num_bytes, num_samples;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
disable_dma(channel);
|
||||
|
||||
|
@ -1087,7 +1087,7 @@ static void das1800_handle_fifo_half_full(struct comedi_device * dev,
|
|||
struct comedi_subdevice * s)
|
||||
{
|
||||
int numPoints = 0; /* number of points to read */
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
numPoints = FIFO_SIZE / 2;
|
||||
/* if we only need some of the points */
|
||||
|
@ -1107,7 +1107,7 @@ static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
|
|||
{
|
||||
short dpnt;
|
||||
int unipolar;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
unipolar = inb(dev->iobase + DAS1800_CONTROL_C) & UB;
|
||||
|
||||
|
@ -1140,7 +1140,7 @@ static int das1800_cancel(struct comedi_device * dev, struct comedi_subdevice *
|
|||
|
||||
/* test analog input cmd */
|
||||
static int das1800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
|
@ -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()
|
||||
|
||||
// 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;
|
||||
|
||||
|
@ -1337,7 +1337,7 @@ static int control_a_bits(comedi_cmd cmd)
|
|||
}
|
||||
|
||||
// returns appropriate bits for control register c, depending on command
|
||||
static int control_c_bits(comedi_cmd cmd)
|
||||
static int control_c_bits(struct comedi_cmd cmd)
|
||||
{
|
||||
int control_c;
|
||||
int aref;
|
||||
|
@ -1385,7 +1385,7 @@ static int control_c_bits(comedi_cmd cmd)
|
|||
}
|
||||
|
||||
// sets up counters
|
||||
static int setup_counters(struct comedi_device * dev, comedi_cmd cmd)
|
||||
static int setup_counters(struct comedi_device * dev, struct comedi_cmd cmd)
|
||||
{
|
||||
// setup cascaded counters for conversion/scan frequency
|
||||
switch (cmd.scan_begin_src) {
|
||||
|
@ -1424,7 +1424,7 @@ static int setup_counters(struct comedi_device * dev, comedi_cmd cmd)
|
|||
}
|
||||
|
||||
// sets up dma
|
||||
static void setup_dma(struct comedi_device * dev, comedi_cmd cmd)
|
||||
static void setup_dma(struct comedi_device * dev, struct comedi_cmd cmd)
|
||||
{
|
||||
unsigned long lock_flags;
|
||||
const int dual_dma = devpriv->irq_dma_bits & DMA_DUAL;
|
||||
|
@ -1462,7 +1462,7 @@ static void setup_dma(struct comedi_device * dev, comedi_cmd cmd)
|
|||
}
|
||||
|
||||
// programs channel/gain list into card
|
||||
static void program_chanlist(struct comedi_device * dev, comedi_cmd cmd)
|
||||
static void program_chanlist(struct comedi_device * dev, struct comedi_cmd cmd)
|
||||
{
|
||||
int i, n, chan_range;
|
||||
unsigned long irq_flags;
|
||||
|
@ -1494,7 +1494,7 @@ static int das1800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice
|
|||
int ret;
|
||||
int control_a, control_c;
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd cmd = async->cmd;
|
||||
struct comedi_cmd cmd = async->cmd;
|
||||
|
||||
if (!dev->irq) {
|
||||
comedi_error(dev,
|
||||
|
@ -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'
|
||||
static unsigned int suggest_transfer_size(comedi_cmd * cmd)
|
||||
static unsigned int suggest_transfer_size(struct comedi_cmd * cmd)
|
||||
{
|
||||
unsigned int size = DMA_BUF_SIZE;
|
||||
static const int sample_size = 2; // size in bytes of one sample from board
|
||||
|
|
|
@ -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 disable_das800(struct comedi_device * dev);
|
||||
static int das800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int das800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int das800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int dmm32at_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int dmm32at_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int dmm32at_ns_to_timer(unsigned int *ns, int round);
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int i, range;
|
||||
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) {
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
for (i = 0; i < cmd->chanlist_len; i++) {
|
||||
/* read data */
|
||||
|
|
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int chan;
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int timer;
|
||||
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
int timer;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
if (devpriv->usedma == 0) {
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int i;
|
||||
unsigned int chan, range, aref;
|
||||
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);
|
||||
static int hpdi_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int hpdi_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int hpdi_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static irqreturn_t handle_interrupt(int irq, void *d PT_REGS_ARG);
|
||||
static int dio_config_block_size(struct comedi_device * dev, unsigned int * data);
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
if (priv(dev)->dio_config_output) {
|
||||
return -EINVAL;
|
||||
|
@ -839,7 +839,7 @@ static int di_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
|||
uint32_t bits;
|
||||
unsigned long flags;
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
|
||||
hpdi_writel(dev, RX_FIFO_RESET_BIT, BOARD_CONTROL_REG);
|
||||
|
||||
|
|
|
@ -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 ai_check_chanlist(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, comedi_cmd *cmd);
|
||||
struct comedi_subdevice *s, struct comedi_cmd *cmd);
|
||||
|
||||
static int ai_round_cmd_args(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
comedi_cmd *cmd,
|
||||
struct comedi_cmd *cmd,
|
||||
unsigned int *init_ticks,
|
||||
unsigned int *scan_ticks, unsigned int *chan_ticks);
|
||||
|
||||
static int ai_prepare(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
comedi_cmd *cmd,
|
||||
struct comedi_cmd *cmd,
|
||||
unsigned int init_ticks,
|
||||
unsigned int scan_ticks, unsigned int chan_ticks);
|
||||
|
||||
static int ai_write_chanlist(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, comedi_cmd *cmd);
|
||||
struct comedi_subdevice *s, struct comedi_cmd *cmd);
|
||||
|
||||
static irqreturn_t me4000_ai_isr(int irq, void *dev_id PT_REGS_ARG);
|
||||
|
||||
static int me4000_ai_do_cmd_test(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, comedi_cmd *cmd);
|
||||
struct comedi_subdevice *s, struct comedi_cmd *cmd);
|
||||
|
||||
static int me4000_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
|
||||
|
@ -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,
|
||||
struct comedi_subdevice *s, comedi_cmd *cmd)
|
||||
struct comedi_subdevice *s, struct comedi_cmd *cmd)
|
||||
{
|
||||
int aref;
|
||||
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,
|
||||
struct comedi_subdevice *s,
|
||||
comedi_cmd *cmd,
|
||||
struct comedi_cmd *cmd,
|
||||
unsigned int *init_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,
|
||||
struct comedi_subdevice *s,
|
||||
comedi_cmd *cmd,
|
||||
struct comedi_cmd *cmd,
|
||||
unsigned int init_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,
|
||||
struct comedi_subdevice *s, comedi_cmd *cmd)
|
||||
struct comedi_subdevice *s, struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int entry;
|
||||
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 scan_ticks = 0;
|
||||
unsigned int chan_ticks = 0;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
CALL_PDEBUG("In me4000_ai_do_cmd()\n");
|
||||
|
||||
|
@ -1376,7 +1376,7 @@ static int me4000_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *
|
|||
* So I tried to adopt this scheme.
|
||||
*/
|
||||
static int me4000_ai_do_cmd_test(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, comedi_cmd *cmd)
|
||||
struct comedi_subdevice *s, struct comedi_cmd *cmd)
|
||||
{
|
||||
|
||||
unsigned int init_ticks;
|
||||
|
|
|
@ -450,7 +450,7 @@ static int me_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
|||
|
||||
/* Test analog input command */
|
||||
static int me_ai_do_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
comedi_cmd *cmd)
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
//comedi_cmd *cmd = &s->async->cmd;
|
||||
//struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
writeb(ClrEdge | ClrOverflow,
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
//comedi_cmd *cmd = &s->async->cmd;
|
||||
//struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
writeb(ClrEdge | ClrOverflow,
|
||||
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;
|
||||
|
||||
struct ni_gpct *counter = subdev_to_counter(s);
|
||||
// const comedi_cmd *cmd = &s->async->cmd;
|
||||
// const struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
retval = ni_660x_request_mite_channel(dev, counter, COMEDI_INPUT);
|
||||
if (retval) {
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
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 int a2150_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int a2150_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int a2150_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
|
@ -215,7 +215,7 @@ static irqreturn_t a2150_interrupt(int irq, void *d PT_REGS_ARG)
|
|||
struct comedi_device *dev = d;
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
struct comedi_async *async;
|
||||
comedi_cmd *cmd;
|
||||
struct comedi_cmd *cmd;
|
||||
unsigned int max_points, num_points, residue, leftover;
|
||||
short dpnt;
|
||||
static const int sample_size = sizeof(devpriv->dma_buffer[0]);
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
unsigned long lock_flags;
|
||||
unsigned int old_config_bits = devpriv->config_bits;
|
||||
unsigned int trigger_bits;
|
||||
|
|
|
@ -127,7 +127,7 @@ static int atmio16d_attach(struct comedi_device * dev, comedi_devconfig * it);
|
|||
static int atmio16d_detach(struct comedi_device * dev);
|
||||
static irqreturn_t atmio16d_interrupt(int irq, void *d PT_REGS_ARG);
|
||||
static int atmio16d_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int atmio16d_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int atmio16d_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void reset_counters(struct comedi_device * dev);
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0, tmp;
|
||||
#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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int timer, base_clock;
|
||||
unsigned int sample_count, tmp, chan, gain;
|
||||
int i;
|
||||
|
|
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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 labpc_drain_dregs(struct comedi_device * dev);
|
||||
static int labpc_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int labpc_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int labpc_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
|
@ -187,8 +187,8 @@ static int labpc_eeprom_read_insn(struct comedi_device * dev, struct comedi_subd
|
|||
comedi_insn * insn, unsigned int * data);
|
||||
static int labpc_eeprom_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
static unsigned int labpc_suggest_transfer_size(comedi_cmd cmd);
|
||||
static void labpc_adc_timing(struct comedi_device * dev, comedi_cmd * cmd);
|
||||
static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd);
|
||||
static void labpc_adc_timing(struct comedi_device * dev, struct comedi_cmd * cmd);
|
||||
#ifdef CONFIG_COMEDI_PCI
|
||||
static int labpc_find_device(struct comedi_device *dev, int bus, int slot);
|
||||
#endif
|
||||
|
@ -770,7 +770,7 @@ static int labpc_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static enum scan_mode labpc_ai_scan_mode(const comedi_cmd * cmd)
|
||||
static enum scan_mode labpc_ai_scan_mode(const struct comedi_cmd * cmd)
|
||||
{
|
||||
if (cmd->chanlist_len == 1)
|
||||
return MODE_SINGLE_CHAN;
|
||||
|
@ -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,
|
||||
const comedi_cmd * cmd)
|
||||
const struct comedi_cmd * cmd)
|
||||
{
|
||||
int mode, channel, range, aref, i;
|
||||
|
||||
|
@ -865,7 +865,7 @@ static int labpc_ai_chanlist_invalid(const struct comedi_device * dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int labpc_use_continuous_mode(const comedi_cmd * cmd)
|
||||
static int labpc_use_continuous_mode(const struct comedi_cmd * cmd)
|
||||
{
|
||||
if (labpc_ai_scan_mode(cmd) == MODE_SINGLE_CHAN)
|
||||
return 1;
|
||||
|
@ -876,7 +876,7 @@ static int labpc_use_continuous_mode(const comedi_cmd * cmd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int labpc_ai_convert_period(const comedi_cmd * cmd)
|
||||
static unsigned int labpc_ai_convert_period(const struct comedi_cmd * cmd)
|
||||
{
|
||||
if (cmd->convert_src != TRIG_TIMER)
|
||||
return 0;
|
||||
|
@ -888,7 +888,7 @@ static unsigned int labpc_ai_convert_period(const comedi_cmd * cmd)
|
|||
return cmd->convert_arg;
|
||||
}
|
||||
|
||||
static void labpc_set_ai_convert_period(comedi_cmd * cmd, unsigned int ns)
|
||||
static void labpc_set_ai_convert_period(struct comedi_cmd * cmd, unsigned int ns)
|
||||
{
|
||||
if (cmd->convert_src != TRIG_TIMER)
|
||||
return;
|
||||
|
@ -902,7 +902,7 @@ static void labpc_set_ai_convert_period(comedi_cmd * cmd, unsigned int 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)
|
||||
return 0;
|
||||
|
@ -914,7 +914,7 @@ static unsigned int labpc_ai_scan_period(const comedi_cmd * cmd)
|
|||
return cmd->scan_begin_arg;
|
||||
}
|
||||
|
||||
static void labpc_set_ai_scan_period(comedi_cmd * cmd, unsigned int ns)
|
||||
static void labpc_set_ai_scan_period(struct comedi_cmd * cmd, unsigned int ns)
|
||||
{
|
||||
if (cmd->scan_begin_src != TRIG_TIMER)
|
||||
return;
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp, tmp2;
|
||||
|
@ -1069,7 +1069,7 @@ static int labpc_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
|||
unsigned long irq_flags;
|
||||
int ret;
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
enum transfer_type xfer;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -1314,7 +1314,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d PT_REGS_ARG)
|
|||
struct comedi_device *dev = d;
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
struct comedi_async *async;
|
||||
comedi_cmd *cmd;
|
||||
struct comedi_cmd *cmd;
|
||||
|
||||
if (dev->attached == 0) {
|
||||
comedi_error(dev, "premature interrupt");
|
||||
|
@ -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
|
||||
static unsigned int labpc_suggest_transfer_size(comedi_cmd cmd)
|
||||
static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd)
|
||||
{
|
||||
unsigned int size;
|
||||
unsigned int freq;
|
||||
|
@ -1704,7 +1704,7 @@ static unsigned int labpc_suggest_transfer_size(comedi_cmd cmd)
|
|||
}
|
||||
|
||||
// figures out what counter values to use based on command
|
||||
static void labpc_adc_timing(struct comedi_device * dev, comedi_cmd * cmd)
|
||||
static void labpc_adc_timing(struct comedi_device * dev, struct comedi_cmd * cmd)
|
||||
{
|
||||
const int max_counter_value = 0x10000; // max value for 16 bit counter in mode 2
|
||||
const int min_counter_value = 2; // min value for 16 bit counter in mode 2
|
||||
|
|
|
@ -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,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
static int ni_cdio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int ni_cdio_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int ni_cdio_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void handle_cdio_interrupt(struct comedi_device * dev);
|
||||
|
@ -275,7 +275,7 @@ static int ni_gpct_insn_config(struct comedi_device * dev, struct comedi_subdevi
|
|||
comedi_insn * insn, unsigned int * data);
|
||||
static int ni_gpct_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int ni_gpct_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int ni_gpct_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void handle_gpct_interrupt(struct comedi_device * dev,
|
||||
unsigned short counter_index);
|
||||
|
@ -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)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
int chan;
|
||||
int i;
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
const comedi_cmd *cmd = &s->async->cmd;
|
||||
const struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int timer;
|
||||
int mode1 = 0; /* mode1 is needed for both stop and convert */
|
||||
int mode2 = 0;
|
||||
|
@ -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)
|
||||
{
|
||||
const comedi_cmd *cmd = &s->async->cmd;
|
||||
const struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int bits;
|
||||
int i;
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
const comedi_cmd *cmd = &s->async->cmd;
|
||||
const struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned cdo_mode_bits = CDO_FIFO_Mode_Bit | CDO_Halt_On_Error_Bit;
|
||||
int retval;
|
||||
|
||||
|
@ -5096,7 +5096,7 @@ static int ni_gpct_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
|||
int retval;
|
||||
#ifdef PCIDMA
|
||||
struct ni_gpct *counter = s->private;
|
||||
// const comedi_cmd *cmd = &s->async->cmd;
|
||||
// const struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
retval = ni_request_gpct_mite_channel(dev, counter->counter_index,
|
||||
COMEDI_INPUT);
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
#ifdef PCIDMA
|
||||
struct ni_gpct *counter = s->private;
|
||||
|
|
|
@ -400,7 +400,7 @@ typedef struct {
|
|||
#define devpriv ((nidio96_private *)dev->private)
|
||||
|
||||
static int ni_pcidio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int ni_pcidio_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int ni_pcidio_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
unsigned int trignum);
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
/* XXX configure ports for input */
|
||||
writel(0x0000, devpriv->mite->daq_io_addr + Port_Pin_Directions(0));
|
||||
|
|
|
@ -146,7 +146,7 @@ extern int ni_tio_insn_config(struct ni_gpct *counter,
|
|||
extern int ni_tio_winsn(struct ni_gpct *counter,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
extern int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async);
|
||||
extern int ni_tio_cmdtest(struct ni_gpct *counter, comedi_cmd * cmd);
|
||||
extern int ni_tio_cmdtest(struct ni_gpct *counter, struct comedi_cmd * cmd);
|
||||
extern int ni_tio_cancel(struct ni_gpct *counter);
|
||||
extern void ni_tio_handle_interrupt(struct ni_gpct *counter,
|
||||
struct comedi_subdevice * s);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
struct ni_gpct_device *counter_dev = counter->counter_dev;
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
int retval = 0;
|
||||
|
||||
/* write alloc the entire buffer */
|
||||
|
@ -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)
|
||||
{
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
int set_gate_source = 0;
|
||||
unsigned gate_source;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &async->cmd;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
int retval = 0;
|
||||
unsigned long flags;
|
||||
|
||||
|
@ -232,7 +232,7 @@ int ni_tio_cmd(struct ni_gpct *counter, struct comedi_async *async)
|
|||
return retval;
|
||||
}
|
||||
|
||||
int ni_tio_cmdtest(struct ni_gpct *counter, comedi_cmd * cmd)
|
||||
int ni_tio_cmdtest(struct ni_gpct *counter, struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
|
|
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int tmp;
|
||||
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)
|
||||
{
|
||||
int timer1, timer2;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
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,
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
unsigned int divisor1 = 0, divisor2 = 0, i, dma_flags, bytes;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
#ifdef PCL812_EXTDEBUG
|
||||
rt_printk("pcl812 EDBG: BGN: pcl812_ai_cmd(...)\n");
|
||||
|
|
|
@ -219,7 +219,7 @@ static int set_rtc_irq_bit(unsigned char bit);
|
|||
#endif
|
||||
|
||||
static int pcl816_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int pcl816_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
|
||||
/*
|
||||
|
@ -443,7 +443,7 @@ static irqreturn_t interrupt_pcl816(int irq, void *d PT_REGS_ARG)
|
|||
==============================================================================
|
||||
COMMAND MODE
|
||||
*/
|
||||
static void pcl816_cmdtest_out(int e, comedi_cmd * cmd)
|
||||
static void pcl816_cmdtest_out(int e, struct comedi_cmd * cmd)
|
||||
{
|
||||
rt_printk("pcl816 e=%d startsrc=%x scansrc=%x convsrc=%x\n", e,
|
||||
cmd->start_src, cmd->scan_begin_src, cmd->convert_src);
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
unsigned int divisor1 = 0, divisor2 = 0, dma_flags, bytes, dmairq;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
if (cmd->start_src != TRIG_NOW)
|
||||
return -EINVAL;
|
||||
|
|
|
@ -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,
|
||||
struct comedi_subdevice * s)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int divisor1, divisor2;
|
||||
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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int retval;
|
||||
|
||||
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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int pcmmio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
|
||||
/* some helper functions to deal with specifics of this device's registers */
|
||||
static void init_asics(struct comedi_device * dev); /* sets up/clears ASIC chips to defaults */
|
||||
|
@ -946,7 +946,7 @@ static int pcmmio_start_intr(struct comedi_device * dev, struct comedi_subdevice
|
|||
} else {
|
||||
unsigned bits = 0, pol_bits = 0, n;
|
||||
int nports, firstport, asic, port;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
if ((asic = subpriv->dio.intr.asic) < 0)
|
||||
return 1; /* not an interrupt
|
||||
|
@ -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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned long flags;
|
||||
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.
|
||||
*/
|
||||
static int
|
||||
pcmmio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comedi_cmd * cmd)
|
||||
pcmmio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int tmp;
|
||||
|
|
|
@ -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_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int pcmuio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
|
||||
/* some helper functions to deal with specifics of this device's registers */
|
||||
static void init_asics(struct comedi_device * dev); /* sets up/clears ASIC chips to defaults */
|
||||
|
@ -866,7 +866,7 @@ static int pcmuio_start_intr(struct comedi_device * dev, struct comedi_subdevice
|
|||
} else {
|
||||
unsigned bits = 0, pol_bits = 0, n;
|
||||
int nports, firstport, asic, port;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
if ((asic = subpriv->intr.asic) < 0)
|
||||
return 1; /* not an interrupt
|
||||
|
@ -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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned long flags;
|
||||
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.
|
||||
*/
|
||||
static int
|
||||
pcmuio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, comedi_cmd * cmd)
|
||||
pcmuio_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int tmp;
|
||||
|
|
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
local_info_t *local = (local_info_t *) s->private;
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int counter = 100;
|
||||
int scanlist_start_on_every_entry;
|
||||
int threshold;
|
||||
|
|
|
@ -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,
|
||||
comedi_insn *insn, unsigned int *data);
|
||||
static int rtd_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
comedi_cmd *cmd);
|
||||
struct comedi_cmd *cmd);
|
||||
static int rtd_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
static int rtd_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
/* static int rtd_ai_poll (struct comedi_device *dev,struct comedi_subdevice *s); */
|
||||
|
@ -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,
|
||||
struct comedi_subdevice *s, comedi_cmd *cmd)
|
||||
struct comedi_subdevice *s, struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int timer;
|
||||
|
||||
/* 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);
|
||||
static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
static int s626_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
comedi_cmd *cmd);
|
||||
struct comedi_cmd *cmd);
|
||||
static int s626_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
static int s626_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
comedi_insn *insn, unsigned int *data);
|
||||
|
@ -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,
|
||||
comedi_insn *insn, unsigned int *data);
|
||||
static int s626_ns_to_timer(int *nanosec, int round_mode);
|
||||
static int s626_ai_load_polllist(uint8_t *ppl, comedi_cmd *cmd);
|
||||
static int s626_ai_load_polllist(uint8_t *ppl, struct comedi_cmd *cmd);
|
||||
static int s626_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int trignum);
|
||||
static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG);
|
||||
|
@ -972,7 +972,7 @@ static irqreturn_t s626_irq_handler(int irq, void *d PT_REGS_ARG)
|
|||
{
|
||||
struct comedi_device *dev = d;
|
||||
struct comedi_subdevice *s;
|
||||
comedi_cmd *cmd;
|
||||
struct comedi_cmd *cmd;
|
||||
struct enc_private *k;
|
||||
unsigned long flags;
|
||||
int32_t *readaddr;
|
||||
|
@ -1318,7 +1318,7 @@ void ResetADC(struct comedi_device *dev, uint8_t *ppl)
|
|||
uint16_t i;
|
||||
uint16_t n;
|
||||
uint32_t LocalPPL;
|
||||
comedi_cmd *cmd = &(dev->subdevices->async->cmd);
|
||||
struct comedi_cmd *cmd = &(dev->subdevices->async->cmd);
|
||||
|
||||
/* Stop RPS program in case it is currently running. */
|
||||
MC_DISABLE(P_MC1, MC1_ERPS1);
|
||||
|
@ -1638,7 +1638,7 @@ static int s626_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice
|
|||
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;
|
||||
|
@ -1677,7 +1677,7 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
|||
{
|
||||
|
||||
uint8_t ppl[16];
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
struct enc_private *k;
|
||||
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,
|
||||
comedi_cmd *cmd)
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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,
|
||||
comedi_insn * insn, unsigned int * data);
|
||||
static int skel_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_cmd * cmd);
|
||||
struct comedi_cmd * cmd);
|
||||
static int skel_ns_to_timer(unsigned int *ns, int round);
|
||||
|
||||
/*
|
||||
|
@ -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,
|
||||
comedi_cmd * cmd)
|
||||
struct comedi_cmd * cmd)
|
||||
{
|
||||
int err = 0;
|
||||
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,
|
||||
comedi_cmd *cmd)
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0, tmp, i;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int chan, range;
|
||||
int i, ret;
|
||||
struct usbduxsub *this_usbduxsub = dev->private;
|
||||
|
@ -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,
|
||||
comedi_cmd *cmd)
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0, tmp;
|
||||
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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int chan, gain;
|
||||
int i, ret;
|
||||
struct usbduxsub *this_usbduxsub = dev->private;
|
||||
|
|
|
@ -578,7 +578,7 @@ int usbduxfastsub_submit_InURBs(struct usbduxfastsub_s *udfs)
|
|||
}
|
||||
|
||||
static int usbduxfast_ai_cmdtest(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, comedi_cmd *cmd)
|
||||
struct comedi_subdevice *s, struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0, stop_mask = 0;
|
||||
long int steps, tmp;
|
||||
|
@ -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)
|
||||
{
|
||||
comedi_cmd *cmd = &s->async->cmd;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int chan, gain, rngmask = 0xff;
|
||||
int i, j, ret;
|
||||
struct usbduxfastsub_s *udfs;
|
||||
|
|
|
@ -121,7 +121,7 @@ int comedi_fileno(void *d)
|
|||
return dev->minor;
|
||||
}
|
||||
|
||||
int comedi_command(void *d, comedi_cmd *cmd)
|
||||
int comedi_command(void *d, struct comedi_cmd *cmd)
|
||||
{
|
||||
struct comedi_device *dev = (struct comedi_device *) d;
|
||||
struct comedi_subdevice *s;
|
||||
|
@ -161,7 +161,7 @@ int comedi_command(void *d, comedi_cmd *cmd)
|
|||
return s->do_cmd(dev, s);
|
||||
}
|
||||
|
||||
int comedi_command_test(void *d, comedi_cmd *cmd)
|
||||
int comedi_command_test(void *d, struct comedi_cmd *cmd)
|
||||
{
|
||||
struct comedi_device *dev = (struct comedi_device *) d;
|
||||
struct comedi_subdevice *s;
|
||||
|
|
Загрузка…
Ссылка в новой задаче