From c6635bab9d4584c06f799f8f41514aead123a5f4 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Tue, 16 Sep 2008 14:46:52 +0000 Subject: [PATCH] Fixed problem with reporting of insn_bits support duw to it not being null when it is not supported, but rather points at insn_inval. --- comedi/comedi_fops.c | 2 +- comedi/drivers.c | 4 +--- include/linux/comedidev.h | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index de439471..c6af6dd3 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -434,7 +434,7 @@ static int do_subdinfo_ioctl(comedi_device * dev, comedi_subdinfo * arg, if (s->do_cmd) us->subd_flags |= SDF_CMD; - if (s->insn_bits) + if (s->insn_bits != &insn_inval) us->insn_bits_support = COMEDI_SUPPORTED; else us->insn_bits_support = COMEDI_UNSUPPORTED; diff --git a/comedi/drivers.c b/comedi/drivers.c index 36cbf4b9..16df91e7 100644 --- a/comedi/drivers.c +++ b/comedi/drivers.c @@ -48,8 +48,6 @@ static int postconfig(comedi_device * dev); static int insn_rw_emulate_bits(comedi_device * dev, comedi_subdevice * s, comedi_insn * insn, lsampl_t * data); -static int insn_inval(comedi_device * dev, comedi_subdevice * s, - comedi_insn * insn, lsampl_t * data); static void *comedi_recognize(comedi_driver * driv, const char *name); static void comedi_report_boards(comedi_driver * driv); static int poll_invalid(comedi_device * dev, comedi_subdevice * s); @@ -361,7 +359,7 @@ static int poll_invalid(comedi_device * dev, comedi_subdevice * s) return -EINVAL; } -static int insn_inval(comedi_device * dev, comedi_subdevice * s, +int insn_inval(comedi_device * dev, comedi_subdevice * s, comedi_insn * insn, lsampl_t * data) { return -EINVAL; diff --git a/include/linux/comedidev.h b/include/linux/comedidev.h index 796e00bb..26e836f1 100644 --- a/include/linux/comedidev.h +++ b/include/linux/comedidev.h @@ -396,6 +396,8 @@ int check_chanlist(comedi_subdevice * s, int n, unsigned int *chanlist); void comedi_set_subdevice_runflags(comedi_subdevice * s, unsigned mask, unsigned bits); unsigned comedi_get_subdevice_runflags(comedi_subdevice * s); +int insn_inval(comedi_device * dev, comedi_subdevice * s, + comedi_insn * insn, lsampl_t * data); /* range stuff */ -- 2.26.2