From 8103c5334a882234ef853e54a21b15b13998e8c9 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Tue, 16 Sep 2008 14:49:35 +0000 Subject: [PATCH] Updated it to only run the (unreliable) do_test_for_insn_bits() if the information was not available in the subdevice info. --- lib/filler.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) 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); } } -- 2.26.2