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

staging: comedi: remove subdevice member of struct comedi_async

The `async` member of `struct comedi_subdevice` may point to a `struct
comedi_async` or may be NULL.  The `subdevice` member of `struct
comedi_async` points back to the `struct comedi_subdevice` associated
with it in a one-to-one relationship.

All uses of the `subdevice` member of `struct comedi_async` apart from
its initialization have now been removed (by passing around a pointer to
the subdevice instead of to the "async" structure), so get rid of it.
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 1e575a9c
...@@ -108,8 +108,6 @@ struct comedi_buf_map { ...@@ -108,8 +108,6 @@ struct comedi_buf_map {
}; };
struct comedi_async { struct comedi_async {
struct comedi_subdevice *subdevice;
void *prealloc_buf; /* pre-allocated buffer */ void *prealloc_buf; /* pre-allocated buffer */
unsigned int prealloc_bufsz; /* buffer size, in bytes */ unsigned int prealloc_bufsz; /* buffer size, in bytes */
struct comedi_buf_map *buf_map; /* map of buffer pages */ struct comedi_buf_map *buf_map; /* map of buffer pages */
......
...@@ -307,7 +307,6 @@ static int __comedi_device_postconfig_async(struct comedi_device *dev, ...@@ -307,7 +307,6 @@ static int __comedi_device_postconfig_async(struct comedi_device *dev,
return -ENOMEM; return -ENOMEM;
init_waitqueue_head(&async->wait_head); init_waitqueue_head(&async->wait_head);
async->subdevice = s;
s->async = async; s->async = async;
async->max_bufsize = comedi_default_buf_maxsize_kb * 1024; async->max_bufsize = comedi_default_buf_maxsize_kb * 1024;
......
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