]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: remove comedi_file_info_from_board_minor()
authorIan Abbott <abbotti@mev.co.uk>
Thu, 4 Apr 2013 13:59:14 +0000 (14:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 21:33:21 +0000 (14:33 -0700)
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: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/comedi_fops.c

index 64721f7f089be06ded2f352d940a802b41fe9c1f..71156bdfcdc8a6fe851751c3b13d8edeb1e5bbbd 100644 (file)
@@ -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
 *comedi_file_info_from_subdevice_minor(unsigned minor)
 {
@@ -188,7 +176,10 @@ static struct comedi_device *comedi_dev_from_board_minor(unsigned minor)
 {
        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);
 }