From ed69335c727b7a499ac8499d943c6c879c937d69 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Wed, 19 Dec 2012 15:38:30 -0700 Subject: [PATCH] staging: comedi: comedi_fops: rename comedi_get_device_file_info() 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 Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedi_fops.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index cc6f32d614b6..0920dcc7949f 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -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; @@ -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; } @@ -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 = @@ -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) @@ -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) @@ -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) @@ -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) -- 2.30.2