EXPORT_SYMBOL_GPL(comedi_dev_from_minor);
static struct comedi_subdevice *
-comedi_get_read_subdevice(const struct comedi_file_info *info)
+comedi_read_subdevice(const struct comedi_file_info *info)
{
if (info->read_subdevice)
return info->read_subdevice;
}
static struct comedi_subdevice *
-comedi_get_write_subdevice(const struct comedi_file_info *info)
+comedi_write_subdevice(const struct comedi_file_info *info)
{
if (info->write_subdevice)
return info->write_subdevice;
struct device_attribute *attr, char *buf)
{
struct comedi_file_info *info = dev_get_drvdata(dev);
- struct comedi_subdevice *s = comedi_get_read_subdevice(info);
+ struct comedi_subdevice *s = comedi_read_subdevice(info);
unsigned int size = 0;
mutex_lock(&info->device->mutex);
const char *buf, size_t count)
{
struct comedi_file_info *info = dev_get_drvdata(dev);
- struct comedi_subdevice *s = comedi_get_read_subdevice(info);
+ struct comedi_subdevice *s = comedi_read_subdevice(info);
unsigned int size;
int err;
struct device_attribute *attr, char *buf)
{
struct comedi_file_info *info = dev_get_drvdata(dev);
- struct comedi_subdevice *s = comedi_get_read_subdevice(info);
+ struct comedi_subdevice *s = comedi_read_subdevice(info);
unsigned int size = 0;
mutex_lock(&info->device->mutex);
const char *buf, size_t count)
{
struct comedi_file_info *info = dev_get_drvdata(dev);
- struct comedi_subdevice *s = comedi_get_read_subdevice(info);
+ struct comedi_subdevice *s = comedi_read_subdevice(info);
unsigned int size;
int err;
char *buf)
{
struct comedi_file_info *info = dev_get_drvdata(dev);
- struct comedi_subdevice *s = comedi_get_write_subdevice(info);
+ struct comedi_subdevice *s = comedi_write_subdevice(info);
unsigned int size = 0;
mutex_lock(&info->device->mutex);
const char *buf, size_t count)
{
struct comedi_file_info *info = dev_get_drvdata(dev);
- struct comedi_subdevice *s = comedi_get_write_subdevice(info);
+ struct comedi_subdevice *s = comedi_write_subdevice(info);
unsigned int size;
int err;
struct device_attribute *attr, char *buf)
{
struct comedi_file_info *info = dev_get_drvdata(dev);
- struct comedi_subdevice *s = comedi_get_write_subdevice(info);
+ struct comedi_subdevice *s = comedi_write_subdevice(info);
unsigned int size = 0;
mutex_lock(&info->device->mutex);
const char *buf, size_t count)
{
struct comedi_file_info *info = dev_get_drvdata(dev);
- struct comedi_subdevice *s = comedi_get_write_subdevice(info);
+ struct comedi_subdevice *s = comedi_write_subdevice(info);
unsigned int size;
int err;
struct comedi_devinfo devinfo;
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_file_info *info = comedi_file_info_from_minor(minor);
- struct comedi_subdevice *read_subdev =
- comedi_get_read_subdevice(info);
- struct comedi_subdevice *write_subdev =
- comedi_get_write_subdevice(info);
+ struct comedi_subdevice *read_subdev = comedi_read_subdevice(info);
+ struct comedi_subdevice *write_subdev = comedi_write_subdevice(info);
memset(&devinfo, 0, sizeof(devinfo));
goto done;
}
if (vma->vm_flags & VM_WRITE)
- s = comedi_get_write_subdevice(info);
+ s = comedi_write_subdevice(info);
else
- s = comedi_get_read_subdevice(info);
+ s = comedi_read_subdevice(info);
if (s == NULL) {
retval = -EINVAL;
}
mask = 0;
- read_subdev = comedi_get_read_subdevice(info);
+ read_subdev = comedi_read_subdevice(info);
if (read_subdev) {
poll_wait(file, &read_subdev->async->wait_head, wait);
if (!read_subdev->busy
mask |= POLLIN | POLLRDNORM;
}
}
- write_subdev = comedi_get_write_subdevice(info);
+ write_subdev = comedi_write_subdevice(info);
if (write_subdev) {
poll_wait(file, &write_subdev->async->wait_head, wait);
comedi_buf_write_alloc(write_subdev->async,
goto done;
}
- s = comedi_get_write_subdevice(info);
+ s = comedi_write_subdevice(info);
if (s == NULL) {
retval = -EIO;
goto done;
goto done;
}
- s = comedi_get_read_subdevice(info);
+ s = comedi_read_subdevice(info);
if (s == NULL) {
retval = -EIO;
goto done;