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

staging: comedi: comedi_fops: rename comedi_set_subdevice_runflags()

`comedi_set_subdevice_runflags()` changes the comedi subdevice's
`runflags` member according to a bit-mask and new bit values.  It's name
might suggest that it only "sets", not "clears".  Rename it to
`comedi_update_subdevice_runflags()` to avoid confusion.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 79288489
...@@ -601,7 +601,7 @@ static struct attribute *comedi_dev_attrs[] = { ...@@ -601,7 +601,7 @@ static struct attribute *comedi_dev_attrs[] = {
}; };
ATTRIBUTE_GROUPS(comedi_dev); ATTRIBUTE_GROUPS(comedi_dev);
static void comedi_set_subdevice_runflags(struct comedi_subdevice *s, static void comedi_update_subdevice_runflags(struct comedi_subdevice *s,
unsigned mask, unsigned bits) unsigned mask, unsigned bits)
{ {
unsigned long flags; unsigned long flags;
...@@ -677,7 +677,7 @@ static void do_become_nonbusy(struct comedi_device *dev, ...@@ -677,7 +677,7 @@ static void do_become_nonbusy(struct comedi_device *dev,
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
comedi_set_subdevice_runflags(s, COMEDI_SRF_RUNNING, 0); comedi_update_subdevice_runflags(s, COMEDI_SRF_RUNNING, 0);
if (async) { if (async) {
comedi_buf_reset(s); comedi_buf_reset(s);
async->inttrig = NULL; async->inttrig = NULL;
...@@ -1678,7 +1678,7 @@ static int do_cmd_ioctl(struct comedi_device *dev, ...@@ -1678,7 +1678,7 @@ static int do_cmd_ioctl(struct comedi_device *dev,
if (async->cmd.flags & CMDF_WAKE_EOS) if (async->cmd.flags & CMDF_WAKE_EOS)
async->cb_mask |= COMEDI_CB_EOS; async->cb_mask |= COMEDI_CB_EOS;
comedi_set_subdevice_runflags(s, COMEDI_SRF_BUSY_MASK, comedi_update_subdevice_runflags(s, COMEDI_SRF_BUSY_MASK,
COMEDI_SRF_RUNNING); COMEDI_SRF_RUNNING);
/* /*
...@@ -2657,10 +2657,10 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -2657,10 +2657,10 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
} }
if (runflags_mask) { if (runflags_mask) {
/* /*
* Sets COMEDI_SRF_ERROR and COMEDI_SRF_RUNNING together * Changes COMEDI_SRF_ERROR and COMEDI_SRF_RUNNING together
* atomically. * atomically.
*/ */
comedi_set_subdevice_runflags(s, runflags_mask, runflags); comedi_update_subdevice_runflags(s, runflags_mask, runflags);
} }
if (async->cb_mask & s->async->events) { if (async->cb_mask & s->async->events) {
......
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