summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/comedi_fops.c
diff options
context:
space:
mode:
authorIan Abbott2015-03-27 16:13:03 +0100
committerGreg Kroah-Hartman2015-04-03 13:11:53 +0200
commit258c1dd76bf1223a0f67ff8d799b5eb383a3a632 (patch)
tree4c083f20a52ed34ca417a6f18eefe117736027cc /drivers/staging/comedi/comedi_fops.c
parentstaging: comedi: comedi_fops: simplify comedi_is_subdevice_idle() (diff)
downloadkernel-qcow2-linux-258c1dd76bf1223a0f67ff8d799b5eb383a3a632.tar.gz
kernel-qcow2-linux-258c1dd76bf1223a0f67ff8d799b5eb383a3a632.tar.xz
kernel-qcow2-linux-258c1dd76bf1223a0f67ff8d799b5eb383a3a632.zip
staging: comedi: comedi_fops: remove unnecessary s->async use
In places where the `s->async` value has been stored in a local variable, use the variable instead of repeating `s->async`. 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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 9e49c8ac0cba..999e7d010c83 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -687,7 +687,7 @@ static void do_become_nonbusy(struct comedi_device *dev,
kfree(async->cmd.chanlist);
async->cmd.chanlist = NULL;
s->busy = NULL;
- wake_up_interruptible_all(&s->async->wait_head);
+ wake_up_interruptible_all(&async->wait_head);
} else {
dev_err(dev->class_dev,
"BUG: (?) do_become_nonbusy called with async=NULL\n");
@@ -2652,14 +2652,14 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
if (!comedi_is_subdevice_running(s))
return;
- if (s->async->events & COMEDI_CB_CANCEL_MASK)
+ if (async->events & COMEDI_CB_CANCEL_MASK)
runflags_mask |= COMEDI_SRF_RUNNING;
/*
* Remember if an error event has occurred, so an error
* can be returned the next time the user does a read().
*/
- if (s->async->events & COMEDI_CB_ERROR_MASK) {
+ if (async->events & COMEDI_CB_ERROR_MASK) {
runflags_mask |= COMEDI_SRF_ERROR;
runflags |= COMEDI_SRF_ERROR;
}
@@ -2671,14 +2671,14 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
comedi_update_subdevice_runflags(s, runflags_mask, runflags);
}
- if (async->cb_mask & s->async->events) {
+ if (async->cb_mask & async->events) {
wake_up_interruptible(&async->wait_head);
if (s->subdev_flags & SDF_CMD_READ)
kill_fasync(&dev->async_queue, SIGIO, POLL_IN);
if (s->subdev_flags & SDF_CMD_WRITE)
kill_fasync(&dev->async_queue, SIGIO, POLL_OUT);
}
- s->async->events = 0;
+ async->events = 0;
}
EXPORT_SYMBOL_GPL(comedi_event);