From: Frank Mori Hess Date: Tue, 16 Sep 2008 14:49:35 +0000 (+0000) Subject: Updated it to only run the (unreliable) do_test_for_insn_bits() if the X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8103c5334a882234ef853e54a21b15b13998e8c9;p=comedilib.git Updated it to only run the (unreliable) do_test_for_insn_bits() if the information was not available in the subdevice info. --- diff --git a/lib/filler.c b/lib/filler.c index 98e6280..994e648 100644 --- a/lib/filler.c +++ b/lib/filler.c @@ -143,10 +143,23 @@ int get_subdevices(comedi_t *it) } r[i].has_cmd = do_test_for_cmd(it,i); - if(it->has_insnlist_ioctl){ - r[i].has_insn_bits = do_test_for_insn_bits(it,i); - }else{ + switch(s[i].insn_bits_support) + { + case COMEDI_UNKNOWN_SUPPORT: + if(it->has_insnlist_ioctl){ + r[i].has_insn_bits = do_test_for_insn_bits(it,i); + }else{ + r[i].has_insn_bits = 0; + } + break; + case COMEDI_SUPPORTED: + r[i].has_insn_bits = 1; + break; + case COMEDI_UNSUPPORTED: r[i].has_insn_bits = 0; + break; + default: + assert(0); } }