summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorIan Abbott2015-03-27 16:13:00 +0100
committerGreg Kroah-Hartman2015-04-03 13:11:53 +0200
commitcc64ea4239c354d30f88130ecf5aa81a506b57e3 (patch)
tree1545cc3205f0e2eedf39223d3fb5d7bc913ccb08 /drivers/staging/comedi/comedi_fops.c
parentMerge lustre patches based on 4.0-rc5 into staging-testing (diff)
downloadkernel-qcow2-linux-cc64ea4239c354d30f88130ecf5aa81a506b57e3.tar.gz
kernel-qcow2-linux-cc64ea4239c354d30f88130ecf5aa81a506b57e3.tar.xz
kernel-qcow2-linux-cc64ea4239c354d30f88130ecf5aa81a506b57e3.zip
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: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_fops.c')
-rw-r--r--drivers/staging/comedi/comedi_fops.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 8bf57b736659..2b75b7a1cee0 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -601,8 +601,8 @@ static struct attribute *comedi_dev_attrs[] = {
};
ATTRIBUTE_GROUPS(comedi_dev);
-static void comedi_set_subdevice_runflags(struct comedi_subdevice *s,
- unsigned mask, unsigned bits)
+static void comedi_update_subdevice_runflags(struct comedi_subdevice *s,
+ unsigned mask, unsigned bits)
{
unsigned long flags;
@@ -677,7 +677,7 @@ static void do_become_nonbusy(struct comedi_device *dev,
{
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) {
comedi_buf_reset(s);
async->inttrig = NULL;
@@ -1678,8 +1678,8 @@ static int do_cmd_ioctl(struct comedi_device *dev,
if (async->cmd.flags & CMDF_WAKE_EOS)
async->cb_mask |= COMEDI_CB_EOS;
- comedi_set_subdevice_runflags(s, COMEDI_SRF_BUSY_MASK,
- COMEDI_SRF_RUNNING);
+ comedi_update_subdevice_runflags(s, COMEDI_SRF_BUSY_MASK,
+ COMEDI_SRF_RUNNING);
/*
* Set s->busy _after_ setting COMEDI_SRF_RUNNING flag to avoid
@@ -2657,10 +2657,10 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
}
if (runflags_mask) {
/*
- * Sets COMEDI_SRF_ERROR and COMEDI_SRF_RUNNING together
+ * Changes COMEDI_SRF_ERROR and COMEDI_SRF_RUNNING together
* atomically.
*/
- comedi_set_subdevice_runflags(s, runflags_mask, runflags);
+ comedi_update_subdevice_runflags(s, runflags_mask, runflags);
}
if (async->cb_mask & s->async->events) {