Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 353924
b: refs/heads/master
c: 43bd33f
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent 8d4da8a commit 4e4f160
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 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: 2aae0076c9676a6e56793e25df95eab4bdadc94e
refs/heads/master: 43bd33f22444868cbc9d4cbec7a3efb0a7c2cb25
20 changes: 20 additions & 0 deletions trunk/drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,26 @@ static DEFINE_SPINLOCK(comedi_file_info_table_lock);
static struct comedi_device_file_info
*comedi_file_info_table[COMEDI_NUM_MINORS];

static struct comedi_subdevice *
comedi_get_read_subdevice(const struct comedi_device_file_info *info)
{
if (info->read_subdevice)
return info->read_subdevice;
if (info->device == NULL)
return NULL;
return info->device->read_subdev;
}

static struct comedi_subdevice *
comedi_get_write_subdevice(const struct comedi_device_file_info *info)
{
if (info->write_subdevice)
return info->write_subdevice;
if (info->device == NULL)
return NULL;
return info->device->write_subdev;
}

static int resize_async_buffer(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_async *async, unsigned new_size)
Expand Down
20 changes: 0 additions & 20 deletions trunk/drivers/staging/comedi/comedidev.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,26 +282,6 @@ static const unsigned COMEDI_SUBDEVICE_MINOR_OFFSET = 1;

struct comedi_device_file_info *comedi_get_device_file_info(unsigned minor);

static inline struct comedi_subdevice *comedi_get_read_subdevice(
const struct comedi_device_file_info *info)
{
if (info->read_subdevice)
return info->read_subdevice;
if (info->device == NULL)
return NULL;
return info->device->read_subdev;
}

static inline struct comedi_subdevice *comedi_get_write_subdevice(
const struct comedi_device_file_info *info)
{
if (info->write_subdevice)
return info->write_subdevice;
if (info->device == NULL)
return NULL;
return info->device->write_subdev;
}

int comedi_alloc_subdevices(struct comedi_device *, int);

void comedi_device_detach(struct comedi_device *dev);
Expand Down

0 comments on commit 4e4f160

Please sign in to comment.