All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Gromm <christian.gromm@microchip.com>
To: gregkh@linuxfoundation.org
Cc: driverdev-devel@linuxdriverproject.org,
	Christian Gromm <christian.gromm@microchip.com>
Subject: [PATCH 45/50] staging: most: cdev: replace function prefix
Date: Tue, 21 Nov 2017 15:05:19 +0100	[thread overview]
Message-ID: <1511273124-7840-46-git-send-email-christian.gromm@microchip.com> (raw)
In-Reply-To: <1511273124-7840-1-git-send-email-christian.gromm@microchip.com>

This patch replaces the function prefixes aim_* with comp_*. It is needed
to complete the process of changing the module designator from AIM to
Component.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
---
 drivers/staging/most/cdev/cdev.c | 58 ++++++++++++++++++++--------------------
 1 file changed, 29 insertions(+), 29 deletions(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index 225369d..be535ae 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -112,14 +112,14 @@ static void destroy_channel(struct comp_channel *c)
 }
 
 /**
- * aim_open - implements the syscall to open the device
+ * comp_open - implements the syscall to open the device
  * @inode: inode pointer
  * @filp: file pointer
  *
  * This stores the channel pointer in the private data field of
  * the file structure and activates the channel within the core.
  */
-static int aim_open(struct inode *inode, struct file *filp)
+static int comp_open(struct inode *inode, struct file *filp)
 {
 	struct comp_channel *c;
 	int ret;
@@ -157,13 +157,13 @@ static int aim_open(struct inode *inode, struct file *filp)
 }
 
 /**
- * aim_close - implements the syscall to close the device
+ * comp_close - implements the syscall to close the device
  * @inode: inode pointer
  * @filp: file pointer
  *
  * This stops the channel within the core.
  */
-static int aim_close(struct inode *inode, struct file *filp)
+static int comp_close(struct inode *inode, struct file *filp)
 {
 	struct comp_channel *c = to_channel(inode->i_cdev);
 
@@ -182,14 +182,14 @@ static int aim_close(struct inode *inode, struct file *filp)
 }
 
 /**
- * aim_write - implements the syscall to write to the device
+ * comp_write - implements the syscall to write to the device
  * @filp: file pointer
  * @buf: pointer to user buffer
  * @count: number of bytes to write
  * @offset: offset from where to start writing
  */
-static ssize_t aim_write(struct file *filp, const char __user *buf,
-			 size_t count, loff_t *offset)
+static ssize_t comp_write(struct file *filp, const char __user *buf,
+			  size_t count, loff_t *offset)
 {
 	int ret;
 	size_t to_copy, left;
@@ -236,14 +236,14 @@ static ssize_t aim_write(struct file *filp, const char __user *buf,
 }
 
 /**
- * aim_read - implements the syscall to read from the device
+ * comp_read - implements the syscall to read from the device
  * @filp: file pointer
  * @buf: pointer to user buffer
  * @count: number of bytes to read
  * @offset: offset from where to start reading
  */
 static ssize_t
-aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
+comp_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
 {
 	size_t to_copy, not_copied, copied;
 	struct mbo *mbo;
@@ -287,7 +287,7 @@ aim_read(struct file *filp, char __user *buf, size_t count, loff_t *offset)
 	return copied;
 }
 
-static unsigned int aim_poll(struct file *filp, poll_table *wait)
+static unsigned int comp_poll(struct file *filp, poll_table *wait)
 {
 	struct comp_channel *c = filp->private_data;
 	unsigned int mask = 0;
@@ -309,22 +309,22 @@ static unsigned int aim_poll(struct file *filp, poll_table *wait)
  */
 static const struct file_operations channel_fops = {
 	.owner = THIS_MODULE,
-	.read = aim_read,
-	.write = aim_write,
-	.open = aim_open,
-	.release = aim_close,
-	.poll = aim_poll,
+	.read = comp_read,
+	.write = comp_write,
+	.open = comp_open,
+	.release = comp_close,
+	.poll = comp_poll,
 };
 
 /**
- * aim_disconnect_channel - disconnect a channel
+ * comp_disconnect_channel - disconnect a channel
  * @iface: pointer to interface instance
  * @channel_id: channel index
  *
  * This frees allocated memory and removes the cdev that represents this
  * channel in user space.
  */
-static int aim_disconnect_channel(struct most_interface *iface, int channel_id)
+static int comp_disconnect_channel(struct most_interface *iface, int channel_id)
 {
 	struct comp_channel *c;
 
@@ -354,13 +354,13 @@ static int aim_disconnect_channel(struct most_interface *iface, int channel_id)
 }
 
 /**
- * aim_rx_completion - completion handler for rx channels
+ * comp_rx_completion - completion handler for rx channels
  * @mbo: pointer to buffer object that has completed
  *
  * This searches for the channel linked to this MBO and stores it in the local
  * fifo buffer.
  */
-static int aim_rx_completion(struct mbo *mbo)
+static int comp_rx_completion(struct mbo *mbo)
 {
 	struct comp_channel *c;
 
@@ -387,13 +387,13 @@ static int aim_rx_completion(struct mbo *mbo)
 }
 
 /**
- * aim_tx_completion - completion handler for tx channels
+ * comp_tx_completion - completion handler for tx channels
  * @iface: pointer to interface instance
  * @channel_id: channel index/ID
  *
  * This wakes sleeping processes in the wait-queue.
  */
-static int aim_tx_completion(struct most_interface *iface, int channel_id)
+static int comp_tx_completion(struct most_interface *iface, int channel_id)
 {
 	struct comp_channel *c;
 
@@ -414,7 +414,7 @@ static int aim_tx_completion(struct most_interface *iface, int channel_id)
 }
 
 /**
- * aim_probe - probe function of the driver module
+ * comp_probe - probe function of the driver module
  * @iface: pointer to interface instance
  * @channel_id: channel index/ID
  * @cfg: pointer to actual channel configuration
@@ -424,8 +424,8 @@ static int aim_tx_completion(struct most_interface *iface, int channel_id)
  *
  * Returns 0 on success or error code otherwise.
  */
-static int aim_probe(struct most_interface *iface, int channel_id,
-		     struct most_channel_config *cfg, char *name)
+static int comp_probe(struct most_interface *iface, int channel_id,
+		      struct most_channel_config *cfg, char *name)
 {
 	struct comp_channel *c;
 	unsigned long cl_flags;
@@ -433,7 +433,7 @@ static int aim_probe(struct most_interface *iface, int channel_id,
 	int current_minor;
 
 	if ((!iface) || (!cfg) || (!name)) {
-		pr_info("Probing AIM with bad arguments");
+		pr_info("Probing component with bad arguments");
 		return -EINVAL;
 	}
 	c = get_channel(iface, channel_id);
@@ -497,10 +497,10 @@ static int aim_probe(struct most_interface *iface, int channel_id,
 
 static struct core_component cdev_comp = {
 	.name = "cdev",
-	.probe_channel = aim_probe,
-	.disconnect_channel = aim_disconnect_channel,
-	.rx_completion = aim_rx_completion,
-	.tx_completion = aim_tx_completion,
+	.probe_channel = comp_probe,
+	.disconnect_channel = comp_disconnect_channel,
+	.rx_completion = comp_rx_completion,
+	.tx_completion = comp_tx_completion,
 };
 
 static int __init mod_init(void)
-- 
2.7.4

  parent reply	other threads:[~2017-11-21 14:05 UTC|newest]

Thread overview: 68+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-21 14:04 [PATCH 00/50] staging: most: rework driver architecture and fix defects Christian Gromm
2017-11-21 14:04 ` [PATCH 01/50] staging: most: move core files Christian Gromm
2017-11-21 14:04 ` [PATCH 02/50] staging: most: cdev: rename module Christian Gromm
2017-11-21 14:04 ` [PATCH 03/50] staging: most: i2c: " Christian Gromm
2017-11-21 14:04 ` [PATCH 04/50] staging: most: dim2: " Christian Gromm
2017-11-21 14:04 ` [PATCH 05/50] staging: most: net: " Christian Gromm
2017-11-21 14:04 ` [PATCH 06/50] staging: most: sound: " Christian Gromm
2017-11-21 14:04 ` [PATCH 07/50] staging: most: usb: " Christian Gromm
2017-11-21 14:04 ` [PATCH 08/50] staging: most: video: " Christian Gromm
2017-11-24 15:08   ` Greg KH
2017-11-21 14:04 ` [PATCH 09/50] staging: most: remove proprietary kobjects Christian Gromm
2017-11-24 15:19   ` Greg KH
2017-11-21 14:04 ` [PATCH 10/50] staging: most: core: remove function get_channel_by_iface Christian Gromm
2017-11-22 10:44   ` Frans Klaver
2017-11-21 14:04 ` [PATCH 11/50] staging: most: core: add a match function for the bus Christian Gromm
2017-11-21 14:04 ` [PATCH 12/50] staging: most: core: encapsulate code in function Christian Gromm
2017-11-21 14:04 ` [PATCH 13/50] staging: most: core: rename structure Christian Gromm
2017-11-21 14:04 ` [PATCH 14/50] staging: most: core: rename struct most_c_aim_obj to pipe Christian Gromm
2017-11-21 14:04 ` [PATCH 15/50] staging: most: core: rename struct memeber Christian Gromm
2017-11-21 14:04 ` [PATCH 16/50] staging: most: core: rename members aim* of struct most_channel Christian Gromm
2017-11-21 14:04 ` [PATCH 17/50] staging: most: core: use structure to pack driver specific data Christian Gromm
2017-11-21 14:04 ` [PATCH 18/50] staging: most: core: track aim modules with linked list Christian Gromm
2017-11-21 14:04 ` [PATCH 19/50] staging: most: core: fix sysfs attribute management Christian Gromm
2017-11-21 14:04 ` [PATCH 20/50] staging: most: core: remove struct device Christian Gromm
2017-11-22 13:01   ` PrasannaKumar Muralidharan
2017-11-24 15:10     ` Greg KH
2017-11-24 15:20       ` Greg KH
2017-11-21 14:04 ` [PATCH 21/50] staging: most: core: rename function Christian Gromm
2017-11-21 14:04 ` [PATCH 22/50] staging: most: core: replace struct most_inst_obj Christian Gromm
2017-11-21 14:04 ` [PATCH 23/50] staging: most: core: put channel name in struct most_channel Christian Gromm
2017-11-21 14:04 ` [PATCH 24/50] staging: most: core: remove context pointer Christian Gromm
2017-11-21 14:04 ` [PATCH 25/50] staging: most: usb: remove pointer initialization Christian Gromm
2017-11-21 14:05 ` [PATCH 26/50] staging: most: rename struct most_aim Christian Gromm
2017-11-22 13:01   ` PrasannaKumar Muralidharan
2017-11-21 14:05 ` [PATCH 27/50] staging: most: rename functions to register a driver with most_core Christian Gromm
2017-11-21 14:05 ` [PATCH 28/50] staging: most: core: rename mod_list Christian Gromm
2017-11-21 14:05 ` [PATCH 29/50] staging: most: core: rename aim variables Christian Gromm
2017-11-21 14:05 ` [PATCH 30/50] staging: most: core: rename function link_channel_to_aim Christian Gromm
2017-11-21 14:05 ` [PATCH 31/50] staging: most: net: remove aim designators Christian Gromm
2017-11-21 14:05 ` [PATCH 32/50] staging: most: sound: remove aim designator Christian Gromm
2017-11-21 14:05 ` [PATCH 33/50] staging: most: video: remove aim designators Christian Gromm
2017-11-21 14:05 ` [PATCH 34/50] staging: most: cdev: rename struct aim_channel Christian Gromm
2017-11-21 14:05 ` [PATCH 35/50] staging: most: cdev: rename variable aim_devno Christian Gromm
2017-11-21 14:05 ` [PATCH 36/50] staging: most: cdev: rename class instance aim_class Christian Gromm
2017-11-21 14:05 ` [PATCH 37/50] staging: most: cdev: rename variable cdev_aim Christian Gromm
2017-11-21 14:05 ` [PATCH 38/50] staging: most: fix comment sections Christian Gromm
2017-11-21 14:05 ` [PATCH 39/50] staging: most: core: denote modules as components Christian Gromm
2017-11-21 14:05 ` [PATCH 40/50] staging: most: core: fix formatting Christian Gromm
2017-11-21 14:05 ` [PATCH 41/50] staging: most: usb: clear functional stall on OUT endpoint Christian Gromm
2017-11-22 13:01   ` PrasannaKumar Muralidharan
2017-11-21 14:05 ` [PATCH 42/50] staging: most: core: fix data type Christian Gromm
2017-11-22 13:02   ` PrasannaKumar Muralidharan
2017-11-24 15:09   ` Greg KH
2017-11-21 14:05 ` [PATCH 43/50] staging: most: core: check value returned by match function Christian Gromm
2017-11-21 14:05 ` [PATCH 44/50] staging: most: update driver usage file Christian Gromm
2017-11-21 14:05 ` Christian Gromm [this message]
2017-11-21 14:05 ` [PATCH 46/50] staging: most: cdev: bundle module variables in structure Christian Gromm
2017-11-21 14:05 ` [PATCH 47/50] staging: most: core: remove class generation Christian Gromm
2017-11-22 13:02   ` PrasannaKumar Muralidharan
2017-11-21 14:05 ` [PATCH 48/50] staging: most: core: fix list traversing Christian Gromm
2017-11-21 14:05 ` [PATCH 49/50] staging: most: add ABI documentation Christian Gromm
2017-11-21 14:05 ` [PATCH 50/50] staging: most: usb: fix show/store function names Christian Gromm
2017-11-22 13:00 ` [PATCH 00/50] staging: most: rework driver architecture and fix defects PrasannaKumar Muralidharan
2017-11-24 15:11   ` Greg KH
2017-11-24 15:31 ` Greg KH
2017-11-24 15:46   ` Christian Gromm
2017-11-27 13:38   ` Christian Gromm
2017-11-27 15:07     ` Greg KH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1511273124-7840-46-git-send-email-christian.gromm@microchip.com \
    --to=christian.gromm@microchip.com \
    --cc=driverdev-devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.