[PATCH 33/37] staging: comedi: remove comedi_file_info_from_board_minor()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 drivers/staging/comedi/comedi_fops.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 64721f7..71156bd 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -154,18 +154,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)
 {
 	struct comedi_file_info *info;
@@ -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);
 }
 
-- 
1.8.1.5

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux