Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353927
b: refs/heads/master
c: 87b1ad7
h: refs/heads/master
i:
  353925: 01c373b
  353923: 8d4da8a
  353919: 1d28a6f
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent 223f193 commit 5673f4e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 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: 4da5fa9a439fda3019585aecab44462fd641b6f8
refs/heads/master: 87b1ad7a80d0a297448893e06f37c775951119d0
24 changes: 12 additions & 12 deletions trunk/drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ static DEFINE_SPINLOCK(comedi_file_info_table_lock);
static struct comedi_device_file_info
*comedi_file_info_table[COMEDI_NUM_MINORS];

static struct comedi_device_file_info *
comedi_get_device_file_info(unsigned minor)
{
struct comedi_device_file_info *info;

BUG_ON(minor >= COMEDI_NUM_MINORS);
spin_lock(&comedi_file_info_table_lock);
info = comedi_file_info_table[minor];
spin_unlock(&comedi_file_info_table_lock);
return info;
}

struct comedi_device *comedi_dev_from_minor(unsigned minor)
{
struct comedi_device_file_info *info;
Expand Down Expand Up @@ -2540,15 +2552,3 @@ void comedi_free_subdevice_minor(struct comedi_subdevice *s)
}
kfree(info);
}

struct comedi_device_file_info *comedi_get_device_file_info(unsigned minor)
{
struct comedi_device_file_info *info;

BUG_ON(minor >= COMEDI_NUM_MINORS);
spin_lock(&comedi_file_info_table_lock);
info = comedi_file_info_table[minor];
spin_unlock(&comedi_file_info_table_lock);
return info;
}
EXPORT_SYMBOL_GPL(comedi_get_device_file_info);
2 changes: 0 additions & 2 deletions trunk/drivers/staging/comedi/comedidev.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,8 +280,6 @@ enum comedi_minor_bits {
static const unsigned COMEDI_SUBDEVICE_MINOR_SHIFT = 4;
static const unsigned COMEDI_SUBDEVICE_MINOR_OFFSET = 1;

struct comedi_device_file_info *comedi_get_device_file_info(unsigned minor);

struct comedi_device *comedi_dev_from_minor(unsigned minor);

int comedi_alloc_subdevices(struct comedi_device *, int);
Expand Down

0 comments on commit 5673f4e

Please sign in to comment.