diff options
author | Ian Abbott | 2014-05-02 14:50:13 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2014-05-04 02:12:17 +0200 |
commit | 0ce016d0986ae618e0686489ad7b858fa13b885d (patch) | |
tree | 1fe330a814b1822cebc4bfb69b2a42c472e593ed | |
parent | staging: comedi: amplc_dio200_common: correct bound on counter mode (diff) | |
download | kernel-qcow2-linux-0ce016d0986ae618e0686489ad7b858fa13b885d.tar.gz kernel-qcow2-linux-0ce016d0986ae618e0686489ad7b858fa13b885d.tar.xz kernel-qcow2-linux-0ce016d0986ae618e0686489ad7b858fa13b885d.zip |
staging: comedi: remove redundant pointer dereference in comedi_poll()
`s->async->subdevice` in `comedi_poll()` points to the same `struct
comedi_subdevice` as `s`, so the double pointer reference is redundant.
Just use `s`.
(`s->async->subdevice` is initialized by
`__comedi_device_postconfig_async()` in
"drivers/staging/comedi/drivers.c" and doesn't change.)
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>
-rw-r--r-- | drivers/staging/comedi/comedi_fops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index b24bf9bcbe2d..ecd27a6fc7f9 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -2035,7 +2035,7 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait) s = comedi_write_subdevice(dev, minor); if (s && s->async) { - unsigned int bps = bytes_per_sample(s->async->subdevice); + unsigned int bps = bytes_per_sample(s); poll_wait(file, &s->async->wait_head, wait); comedi_buf_write_alloc(s->async, s->async->prealloc_bufsz); |