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

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: 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 6e2954e8
...@@ -2035,7 +2035,7 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait) ...@@ -2035,7 +2035,7 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait)
s = comedi_write_subdevice(dev, minor); s = comedi_write_subdevice(dev, minor);
if (s && s->async) { 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); poll_wait(file, &s->async->wait_head, wait);
comedi_buf_write_alloc(s->async, s->async->prealloc_bufsz); comedi_buf_write_alloc(s->async, s->async->prealloc_bufsz);
......
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