Skip to content

Commit

Permalink
staging: comedi: comedi_fops: rename comedi_get_device_file_info()
Browse files Browse the repository at this point in the history
The 'get' usually implies increasing a reference count of an object.
This function returns a pointer but does not do any reference counting.
For aesthetic reasons, rename the function to better represent what
its doing.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 7, 2013
1 parent cd6b763 commit ed69335
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ struct comedi_file_info {
static DEFINE_SPINLOCK(comedi_file_info_table_lock);
static struct comedi_file_info *comedi_file_info_table[COMEDI_NUM_MINORS];

static struct comedi_file_info *comedi_get_device_file_info(unsigned minor)
static struct comedi_file_info *comedi_file_info_from_minor(unsigned minor)
{
struct comedi_file_info *info;

Expand All @@ -111,7 +111,7 @@ struct comedi_device *comedi_dev_from_minor(unsigned minor)
{
struct comedi_file_info *info;

info = comedi_get_device_file_info(minor);
info = comedi_file_info_from_minor(minor);

return info ? info->device : NULL;
}
Expand Down Expand Up @@ -582,7 +582,7 @@ static int do_devinfo_ioctl(struct comedi_device *dev,
{
struct comedi_devinfo devinfo;
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_file_info *info = comedi_get_device_file_info(minor);
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 =
Expand Down Expand Up @@ -1750,7 +1750,7 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma)
int i;
int retval;
struct comedi_subdevice *s;
struct comedi_file_info *info = comedi_get_device_file_info(minor);
struct comedi_file_info *info = comedi_file_info_from_minor(minor);
struct comedi_device *dev;

if (info == NULL)
Expand Down Expand Up @@ -1826,7 +1826,7 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait)
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_subdevice *read_subdev;
struct comedi_subdevice *write_subdev;
struct comedi_file_info *info = comedi_get_device_file_info(minor);
struct comedi_file_info *info = comedi_file_info_from_minor(minor);
struct comedi_device *dev;

if (info == NULL)
Expand Down Expand Up @@ -1879,7 +1879,7 @@ static ssize_t comedi_write(struct file *file, const char __user *buf,
int n, m, count = 0, retval = 0;
DECLARE_WAITQUEUE(wait, current);
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_file_info *info = comedi_get_device_file_info(minor);
struct comedi_file_info *info = comedi_file_info_from_minor(minor);
struct comedi_device *dev;

if (info == NULL)
Expand Down Expand Up @@ -1989,7 +1989,7 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
int n, m, count = 0, retval = 0;
DECLARE_WAITQUEUE(wait, current);
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_file_info *info = comedi_get_device_file_info(minor);
struct comedi_file_info *info = comedi_file_info_from_minor(minor);
struct comedi_device *dev;

if (info == NULL)
Expand Down

0 comments on commit ed69335

Please sign in to comment.