Commit 8907cf6c authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: remove COMEDI_FIRST_SUBDEVICE_MINOR

The macro `COMEDI_FIRST_SUBDEVICE_MINOR` just expands to another macro
`COMEDI_NUM_BOARD_MINORS`.  Replace uses of
`COMEDI_FIRST_SUBDEVICE_MINOR` with `COMEDI_NUM_BOARD_MINORS` and get
rid of the former.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reviewed-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eda56825
...@@ -50,7 +50,6 @@ ...@@ -50,7 +50,6 @@
#include "comedi_internal.h" #include "comedi_internal.h"
#define COMEDI_NUM_MINORS 0x100 #define COMEDI_NUM_MINORS 0x100
#define COMEDI_FIRST_SUBDEVICE_MINOR COMEDI_NUM_BOARD_MINORS
#ifdef CONFIG_COMEDI_DEBUG #ifdef CONFIG_COMEDI_DEBUG
int comedi_debug; int comedi_debug;
...@@ -2400,7 +2399,7 @@ int comedi_alloc_subdevice_minor(struct comedi_subdevice *s) ...@@ -2400,7 +2399,7 @@ int comedi_alloc_subdevice_minor(struct comedi_subdevice *s)
if (s->subdev_flags & SDF_CMD_WRITE) if (s->subdev_flags & SDF_CMD_WRITE)
info->write_subdevice = s; info->write_subdevice = s;
mutex_lock(&comedi_file_info_table_lock); mutex_lock(&comedi_file_info_table_lock);
for (i = COMEDI_FIRST_SUBDEVICE_MINOR; i < COMEDI_NUM_MINORS; ++i) { for (i = COMEDI_NUM_BOARD_MINORS; i < COMEDI_NUM_MINORS; ++i) {
if (comedi_file_info_table[i] == NULL) { if (comedi_file_info_table[i] == NULL) {
comedi_file_info_table[i] = info; comedi_file_info_table[i] = info;
break; break;
...@@ -2433,7 +2432,7 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s) ...@@ -2433,7 +2432,7 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s)
return; return;
BUG_ON(s->minor >= COMEDI_NUM_MINORS); BUG_ON(s->minor >= COMEDI_NUM_MINORS);
BUG_ON(s->minor < COMEDI_FIRST_SUBDEVICE_MINOR); BUG_ON(s->minor < COMEDI_NUM_BOARD_MINORS);
info = comedi_clear_minor(s->minor); info = comedi_clear_minor(s->minor);
if (s->class_dev) { if (s->class_dev) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment