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

staging: comedi: remove comedi_file_info_from_board_minor()

Merge the code from `comedi_file_info_from_board_minor()` into
`comedi_dev_from_board_minor()` and remove it since nothing else calls
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 0fcc9d48
...@@ -153,18 +153,6 @@ static void comedi_free_board_file_info(struct comedi_file_info *info) ...@@ -153,18 +153,6 @@ static void comedi_free_board_file_info(struct comedi_file_info *info)
} }
} }
static struct comedi_file_info
*comedi_file_info_from_board_minor(unsigned minor)
{
struct comedi_file_info *info;
BUG_ON(minor >= COMEDI_NUM_BOARD_MINORS);
mutex_lock(&comedi_board_minor_table_lock);
info = comedi_board_minor_table[minor];
mutex_unlock(&comedi_board_minor_table_lock);
return info;
}
static struct comedi_file_info static struct comedi_file_info
*comedi_file_info_from_subdevice_minor(unsigned minor) *comedi_file_info_from_subdevice_minor(unsigned minor)
{ {
...@@ -188,7 +176,10 @@ static struct comedi_device *comedi_dev_from_board_minor(unsigned minor) ...@@ -188,7 +176,10 @@ static struct comedi_device *comedi_dev_from_board_minor(unsigned minor)
{ {
struct comedi_file_info *info; struct comedi_file_info *info;
info = comedi_file_info_from_board_minor(minor); BUG_ON(minor >= COMEDI_NUM_BOARD_MINORS);
mutex_lock(&comedi_board_minor_table_lock);
info = comedi_board_minor_table[minor];
mutex_unlock(&comedi_board_minor_table_lock);
return comedi_dev_from_file_info(info); return comedi_dev_from_file_info(info);
} }
......
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