diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2012-12-19 22:35:23 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-07 22:25:46 (GMT) |
commit | 4da5fa9a439fda3019585aecab44462fd641b6f8 (patch) | |
tree | d9d10ba2f73869cba60a66b605c3f40d154f3c48 /drivers/staging/comedi/kcomedilib | |
parent | 85104e9b409013c78624b367dec02e6ccc996635 (diff) | |
download | linux-fsl-qoriq-4da5fa9a439fda3019585aecab44462fd641b6f8.tar.xz |
staging: comedi: use comedi_dev_from_minor()
Remove the need to export comedi_get_device_file_info() by using the
new helper comedi_dev_from_minor(). This will also allow us to make
the comedi_device_file_info struct private.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/kcomedilib')
-rw-r--r-- | drivers/staging/comedi/kcomedilib/kcomedilib_main.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c index 4dc09a2..8932a51 100644 --- a/drivers/staging/comedi/kcomedilib/kcomedilib_main.c +++ b/drivers/staging/comedi/kcomedilib/kcomedilib_main.c @@ -42,7 +42,6 @@ MODULE_LICENSE("GPL"); struct comedi_device *comedi_open(const char *filename) { - struct comedi_device_file_info *dev_file_info; struct comedi_device *dev; unsigned int minor; @@ -54,12 +53,9 @@ struct comedi_device *comedi_open(const char *filename) if (minor >= COMEDI_NUM_BOARD_MINORS) return NULL; - dev_file_info = comedi_get_device_file_info(minor); - if (dev_file_info == NULL) - return NULL; - dev = dev_file_info->device; + dev = comedi_dev_from_minor(minor); - if (dev == NULL || !dev->attached) + if (!dev || !dev->attached) return NULL; if (!try_module_get(dev->driver->module)) |