Commit 64d9b1d2 authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: remove unused 'channel flags' support

The `flags` and `flaglist` members of `struct comedi_subdevice` were
defined to supply "all-channel" flags via the `COMEDI_SUBDINFO` ioctl,
or "channel-specific" flags via the `COMEDI_CHANINFO` ioctls,
respectively.  However, no comedi driver has ever set them.

It's not entirely clear how "all-channel" flags would differ from the
"subdevice" flags passed by `COMEDI_SUBDINFO`.  It is conceivable that
"channel-specific" flags could be used to describe different analog
reference values (or whatever) supported by different channels.
Presumably these would use some sub-set of the `SDF_xxx` subdevice flag
values, or possibly the `CR_xxx` flag values that get packed into a
"chanspec" value (along with a channel number and range code).  The
original intentions are lost in the mists of time.

For now, just remove the `flags` and `flaglist` members from `struct
comedi_subdevice` and behave as though they have been left at their
default values (0 or NULL) by the low-level comedi driver.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3ceba4ba
...@@ -806,7 +806,6 @@ static int do_subdinfo_ioctl(struct comedi_device *dev, ...@@ -806,7 +806,6 @@ static int do_subdinfo_ioctl(struct comedi_device *dev,
} else { } else {
us->range_type = 0; /* XXX */ us->range_type = 0; /* XXX */
} }
us->flags = s->flags;
if (s->busy) if (s->busy)
us->subd_flags |= SDF_BUSY; us->subd_flags |= SDF_BUSY;
...@@ -818,8 +817,6 @@ static int do_subdinfo_ioctl(struct comedi_device *dev, ...@@ -818,8 +817,6 @@ static int do_subdinfo_ioctl(struct comedi_device *dev,
us->subd_flags |= SDF_LOCK_OWNER; us->subd_flags |= SDF_LOCK_OWNER;
if (!s->maxdata && s->maxdata_list) if (!s->maxdata && s->maxdata_list)
us->subd_flags |= SDF_MAXDATA; us->subd_flags |= SDF_MAXDATA;
if (s->flaglist)
us->subd_flags |= SDF_FLAGS;
if (s->range_table_list) if (s->range_table_list)
us->subd_flags |= SDF_RANGETYPE; us->subd_flags |= SDF_RANGETYPE;
if (s->do_cmd) if (s->do_cmd)
...@@ -875,13 +872,8 @@ static int do_chaninfo_ioctl(struct comedi_device *dev, ...@@ -875,13 +872,8 @@ static int do_chaninfo_ioctl(struct comedi_device *dev,
return -EFAULT; return -EFAULT;
} }
if (it.flaglist) { if (it.flaglist)
if (!s->flaglist) return -EINVAL; /* flaglist not supported */
return -EINVAL;
if (copy_to_user(it.flaglist, s->flaglist,
s->n_chan * sizeof(unsigned int)))
return -EFAULT;
}
if (it.rangelist) { if (it.rangelist) {
int i; int i;
......
...@@ -57,9 +57,6 @@ struct comedi_subdevice { ...@@ -57,9 +57,6 @@ struct comedi_subdevice {
unsigned int maxdata; /* if maxdata==0, use list */ unsigned int maxdata; /* if maxdata==0, use list */
const unsigned int *maxdata_list; /* list is channel specific */ const unsigned int *maxdata_list; /* list is channel specific */
unsigned int flags;
const unsigned int *flaglist;
unsigned int settling_time_0; unsigned int settling_time_0;
const struct comedi_lrange *range_table; const struct comedi_lrange *range_table;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment