Get rid of spurious "subdevice does not support commands" warnings.
This commit is contained in:
parent
3dd23bc127
commit
0c0a3440db
1 changed files with 6 additions and 1 deletions
|
@ -123,6 +123,10 @@ int comedi_get_cmd_src_mask(comedi_t *it,unsigned int s,comedi_cmd *cmd)
|
|||
{
|
||||
memset(cmd,0,sizeof(*cmd));
|
||||
|
||||
if(!(comedi_get_subdevice_flags(it,s)&SDF_CMD)){
|
||||
return -1;
|
||||
}
|
||||
|
||||
cmd->subdev = s;
|
||||
|
||||
cmd->flags = 0;
|
||||
|
@ -141,7 +145,8 @@ int comedi_get_cmd_fast_1chan(comedi_t *it,unsigned int s,comedi_cmd *cmd)
|
|||
{
|
||||
int ret;
|
||||
|
||||
comedi_get_cmd_src_mask(it,s,cmd);
|
||||
ret = comedi_get_cmd_src_mask(it,s,cmd);
|
||||
if(ret<0)return ret;
|
||||
|
||||
cmd->chanlist_len = 1;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue