Staging: comedi: add comedi_num_legacy_minors module parameter
As suggested the legacy device count is set to zero. A new module parameter for comedi_fops allows setting the number of legacy devices: comedi_num_legacy_minors. The default is zero. From: Bernd Porr <BerndPorr@f2s.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Cc: David Schleef <ds@schleef.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
6a9d7a21d7
commit
1dd33ab8a9
1 changed files with 5 additions and 2 deletions
|
@ -62,6 +62,9 @@ module_param(comedi_debug, int, 0644);
|
|||
int comedi_autoconfig = 1;
|
||||
module_param(comedi_autoconfig, bool, 0444);
|
||||
|
||||
int comedi_num_legacy_minors = 0;
|
||||
module_param(comedi_num_legacy_minors, int, 0444);
|
||||
|
||||
static DEFINE_SPINLOCK(comedi_file_info_table_lock);
|
||||
static struct comedi_device_file_info
|
||||
*comedi_file_info_table[COMEDI_NUM_MINORS];
|
||||
|
@ -1896,7 +1899,7 @@ static void comedi_cleanup_legacy_minors(void)
|
|||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 0; i < COMEDI_NUM_LEGACY_MINORS; i++)
|
||||
for (i = 0; i < comedi_num_legacy_minors; i++)
|
||||
comedi_free_board_minor(i);
|
||||
}
|
||||
|
||||
|
@ -1936,7 +1939,7 @@ static int __init comedi_init(void)
|
|||
comedi_proc_init();
|
||||
|
||||
/* create devices files for legacy/manual use */
|
||||
for (i = 0; i < COMEDI_NUM_LEGACY_MINORS; i++) {
|
||||
for (i = 0; i < comedi_num_legacy_minors; i++) {
|
||||
int minor;
|
||||
minor = comedi_alloc_board_minor(NULL);
|
||||
if (minor < 0) {
|
||||
|
|
Loading…
Add table
Reference in a new issue