This function is now only used in comedi_fops.c and does not need to be exported. Make it static and move it to avoid forward declarations. Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> Cc: Ian Abbott <abbotti@xxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/comedi/comedi_fops.c | 24 ++++++++++++------------ drivers/staging/comedi/comedidev.h | 2 -- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 3945b5f..1950f1e 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -90,6 +90,18 @@ static DEFINE_SPINLOCK(comedi_file_info_table_lock); static struct comedi_device_file_info *comedi_file_info_table[COMEDI_NUM_MINORS]; +static struct comedi_device_file_info * +comedi_get_device_file_info(unsigned minor) +{ + struct comedi_device_file_info *info; + + BUG_ON(minor >= COMEDI_NUM_MINORS); + spin_lock(&comedi_file_info_table_lock); + info = comedi_file_info_table[minor]; + spin_unlock(&comedi_file_info_table_lock); + return info; +} + struct comedi_device *comedi_dev_from_minor(unsigned minor) { struct comedi_device_file_info *info; @@ -2540,15 +2552,3 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s) } kfree(info); } - -struct comedi_device_file_info *comedi_get_device_file_info(unsigned minor) -{ - struct comedi_device_file_info *info; - - BUG_ON(minor >= COMEDI_NUM_MINORS); - spin_lock(&comedi_file_info_table_lock); - info = comedi_file_info_table[minor]; - spin_unlock(&comedi_file_info_table_lock); - return info; -} -EXPORT_SYMBOL_GPL(comedi_get_device_file_info); diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index fc2c179..3e1fd84 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -280,8 +280,6 @@ enum comedi_minor_bits { static const unsigned COMEDI_SUBDEVICE_MINOR_SHIFT = 4; static const unsigned COMEDI_SUBDEVICE_MINOR_OFFSET = 1; -struct comedi_device_file_info *comedi_get_device_file_info(unsigned minor); - struct comedi_device *comedi_dev_from_minor(unsigned minor); int comedi_alloc_subdevices(struct comedi_device *, int); -- 1.8.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel