Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363918
b: refs/heads/master
c: ea1cc39
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Apr 5, 2013
1 parent 26d5a07 commit ddce567
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 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: 5b7dba1bdda5b5864b61d28e32f860510e9a660f
refs/heads/master: ea1cc3973a6f3832956d99f74b20970a4e71bd37
14 changes: 3 additions & 11 deletions trunk/drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,14 +150,6 @@ static struct comedi_file_info *comedi_clear_subdevice_minor(unsigned minor)
return info;
}

static struct comedi_file_info *comedi_clear_minor(unsigned minor)
{
if (minor < COMEDI_NUM_BOARD_MINORS)
return comedi_clear_board_minor(minor);
else
return comedi_clear_subdevice_minor(minor);
}

static void comedi_free_board_file_info(struct comedi_file_info *info)
{
if (info) {
Expand Down Expand Up @@ -1745,7 +1737,7 @@ static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,
dev->minor >= comedi_num_legacy_minors) {
/* Successfully unconfigured a dynamically
* allocated device. Try and remove it. */
info = comedi_clear_minor(dev->minor);
info = comedi_clear_board_minor(dev->minor);
if (info) {
mutex_unlock(&dev->mutex);
comedi_free_board_file_info(info);
Expand Down Expand Up @@ -2411,7 +2403,7 @@ struct comedi_device *comedi_alloc_board_minor(struct device *hardware_device)
static void comedi_free_board_minor(unsigned minor)
{
BUG_ON(minor >= COMEDI_NUM_BOARD_MINORS);
comedi_free_board_file_info(comedi_clear_minor(minor));
comedi_free_board_file_info(comedi_clear_board_minor(minor));
}

void comedi_release_hardware_device(struct device *hardware_device)
Expand Down Expand Up @@ -2485,7 +2477,7 @@ 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_minor(s->minor);
info = comedi_clear_subdevice_minor(s->minor);
if (s->class_dev) {
device_destroy(comedi_class, MKDEV(COMEDI_MAJOR, s->minor));
s->class_dev = NULL;
Expand Down

0 comments on commit ddce567

Please sign in to comment.