Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363900
b: refs/heads/master
c: 3346b79
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Apr 5, 2013
1 parent a97475a commit 9c59129
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 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: 24fb134d1c336b263f75d7659f56a96382aebb56
refs/heads/master: 3346b798f202bf2f5b5272870ecdb75acec2e752
7 changes: 4 additions & 3 deletions trunk/drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -2348,7 +2348,7 @@ void comedi_free_board_minor(unsigned minor)
comedi_free_board_file_info(comedi_clear_minor(minor));
}

int comedi_find_board_minor(struct device *hardware_device)
void comedi_release_hardware_device(struct device *hardware_device)
{
int minor;
struct comedi_file_info *info;
Expand All @@ -2357,12 +2357,13 @@ int comedi_find_board_minor(struct device *hardware_device)
spin_lock(&comedi_file_info_table_lock);
info = comedi_file_info_table[minor];
if (info && info->hardware_device == hardware_device) {
comedi_file_info_table[minor] = NULL;
spin_unlock(&comedi_file_info_table_lock);
return minor;
comedi_free_board_file_info(info);
break;
}
spin_unlock(&comedi_file_info_table_lock);
}
return -ENODEV;
}

int comedi_alloc_subdevice_minor(struct comedi_subdevice *s)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/staging/comedi/comedi_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ int do_rangeinfo_ioctl(struct comedi_device *dev,
struct comedi_rangeinfo __user *arg);
int comedi_alloc_board_minor(struct device *hardware_device);
void comedi_free_board_minor(unsigned minor);
int comedi_find_board_minor(struct device *hardware_device);
void comedi_release_hardware_device(struct device *hardware_device);
int comedi_alloc_subdevice_minor(struct comedi_subdevice *s);
void comedi_free_subdevice_minor(struct comedi_subdevice *s);

Expand Down
7 changes: 1 addition & 6 deletions trunk/drivers/staging/comedi/drivers.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,14 +459,9 @@ EXPORT_SYMBOL_GPL(comedi_auto_config);

void comedi_auto_unconfig(struct device *hardware_device)
{
int minor;

if (hardware_device == NULL)
return;
minor = comedi_find_board_minor(hardware_device);
if (minor < 0)
return;
comedi_free_board_minor(minor);
comedi_release_hardware_device(hardware_device);
}
EXPORT_SYMBOL_GPL(comedi_auto_unconfig);

Expand Down

0 comments on commit 9c59129

Please sign in to comment.