Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363926
b: refs/heads/master
c: 0fcc9d4
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Apr 5, 2013
1 parent 2da3074 commit c32fcd9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f3abc831386e3606fbb21acf0ee5231df0d0185f
refs/heads/master: 0fcc9d48a0e620ee5097cbcbf8aedc5d736a01b8
19 changes: 6 additions & 13 deletions trunk/drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,6 @@ static struct comedi_file_info *comedi_clear_board_minor(unsigned minor)
return info;
}

static struct comedi_file_info *comedi_clear_subdevice_minor(unsigned minor)
{
struct comedi_file_info *info;
unsigned int i = minor - COMEDI_NUM_BOARD_MINORS;

mutex_lock(&comedi_subdevice_minor_table_lock);
info = comedi_subdevice_minor_table[i];
comedi_subdevice_minor_table[i] = NULL;
mutex_unlock(&comedi_subdevice_minor_table_lock);
return info;
}

static void comedi_free_board_file_info(struct comedi_file_info *info)
{
if (info) {
Expand Down Expand Up @@ -2528,6 +2516,7 @@ int comedi_alloc_subdevice_minor(struct comedi_subdevice *s)
void comedi_free_subdevice_minor(struct comedi_subdevice *s)
{
struct comedi_file_info *info;
unsigned int i;

if (s == NULL)
return;
Expand All @@ -2537,7 +2526,11 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s)
BUG_ON(s->minor >= COMEDI_NUM_MINORS);
BUG_ON(s->minor < COMEDI_NUM_BOARD_MINORS);

info = comedi_clear_subdevice_minor(s->minor);
i = s->minor - COMEDI_NUM_BOARD_MINORS;
mutex_lock(&comedi_subdevice_minor_table_lock);
info = comedi_subdevice_minor_table[i];
comedi_subdevice_minor_table[i] = NULL;
mutex_unlock(&comedi_subdevice_minor_table_lock);
if (s->class_dev) {
device_destroy(comedi_class, MKDEV(COMEDI_MAJOR, s->minor));
s->class_dev = NULL;
Expand Down

0 comments on commit c32fcd9

Please sign in to comment.