[PATCH 20/22] staging: comedi: remove comedi_dev_from_minor()

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

 



The `comedi_dev_from_minor()` function is no longer used, so remove it.
Calls to it have either been replaced by calls to
`comedi_dev_get_from_minor()` or by using the `private_data` member of
the open file object.

Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
---
 drivers/staging/comedi/comedi_fops.c | 28 ----------------------------
 drivers/staging/comedi/comedidev.h   |  1 -
 2 files changed, 29 deletions(-)

diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c
index 08aa93a..d569484 100644
--- a/drivers/staging/comedi/comedi_fops.c
+++ b/drivers/staging/comedi/comedi_fops.c
@@ -189,34 +189,6 @@ static struct comedi_subdevice
 	return s;
 }
 
-static struct comedi_device *comedi_dev_from_board_minor(unsigned minor)
-{
-	struct comedi_device *dev;
-
-	BUG_ON(minor >= COMEDI_NUM_BOARD_MINORS);
-	mutex_lock(&comedi_board_minor_table_lock);
-	dev = comedi_board_minor_table[minor];
-	mutex_unlock(&comedi_board_minor_table_lock);
-	return dev;
-}
-
-static struct comedi_device *comedi_dev_from_subdevice_minor(unsigned minor)
-{
-	struct comedi_subdevice *s;
-
-	s = comedi_subdevice_from_minor(minor);
-	return s ? s->device : NULL;
-}
-
-struct comedi_device *comedi_dev_from_minor(unsigned minor)
-{
-	if (minor < COMEDI_NUM_BOARD_MINORS)
-		return comedi_dev_from_board_minor(minor);
-	else
-		return comedi_dev_from_subdevice_minor(minor);
-}
-EXPORT_SYMBOL_GPL(comedi_dev_from_minor);
-
 static struct comedi_device *comedi_dev_get_from_board_minor(unsigned minor)
 {
 	struct comedi_device *dev;
diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h
index a9b1468..4e7cd14 100644
--- a/drivers/staging/comedi/comedidev.h
+++ b/drivers/staging/comedi/comedidev.h
@@ -235,7 +235,6 @@ enum comedi_minor_bits {
 static const unsigned COMEDI_SUBDEVICE_MINOR_SHIFT = 4;
 static const unsigned COMEDI_SUBDEVICE_MINOR_OFFSET = 1;
 
-struct comedi_device *comedi_dev_from_minor(unsigned minor);
 struct comedi_device *comedi_dev_get_from_minor(unsigned minor);
 int comedi_dev_put(struct comedi_device *dev);
 
-- 
1.8.4.2

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-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