Re: [PATCH 26/50] staging: most: rename struct most_aim

2017-11-22 Thread PrasannaKumar Muralidharan
Hi Christian,

On 21 November 2017 at 19:35, Christian Gromm
 wrote:
> The designator of a module that proivdes means to interface userspace is
> called an AIM. Since this name seems to be unappropiate, this kind of
> moduels are going to be referred to as componetns. This is done because
> such modules function as components to enhance the core with new features.
> This patch renames the struct most_aim to core_component.

Using the word component does not provide much info either. Appreciate
if you can find a better name than core_component.

Regards,
PrasannaKumar
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 26/50] staging: most: rename struct most_aim

2017-11-21 Thread Christian Gromm
The designator of a module that proivdes means to interface userspace is
called an AIM. Since this name seems to be unappropiate, this kind of
moduels are going to be referred to as componetns. This is done because
such modules function as components to enhance the core with new features.
This patch renames the struct most_aim to core_component.

Signed-off-by: Christian Gromm 
---
 drivers/staging/most/cdev/cdev.c   |  4 ++--
 drivers/staging/most/core.c| 30 +++---
 drivers/staging/most/core.h| 16 +++-
 drivers/staging/most/net/net.c |  4 ++--
 drivers/staging/most/sound/sound.c |  6 +++---
 drivers/staging/most/video/video.c |  4 ++--
 6 files changed, 31 insertions(+), 33 deletions(-)

diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c
index c6baa9c..e1290b8 100644
--- a/drivers/staging/most/cdev/cdev.c
+++ b/drivers/staging/most/cdev/cdev.c
@@ -28,7 +28,7 @@ static dev_t aim_devno;
 static struct class *aim_class;
 static struct ida minor_id;
 static unsigned int major;
-static struct most_aim cdev_aim;
+static struct core_component cdev_aim;
 
 struct aim_channel {
wait_queue_head_t wq;
@@ -495,7 +495,7 @@ static int aim_probe(struct most_interface *iface, int 
channel_id,
return retval;
 }
 
-static struct most_aim cdev_aim = {
+static struct core_component cdev_aim = {
.name = "cdev",
.probe_channel = aim_probe,
.disconnect_channel = aim_disconnect_channel,
diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c
index f47d581..fa1ed89d6 100644
--- a/drivers/staging/most/core.c
+++ b/drivers/staging/most/core.c
@@ -46,7 +46,7 @@ static struct mostcore {
 #define to_driver(d) container_of(d, struct mostcore, drv);
 
 struct pipe {
-   struct most_aim *aim;
+   struct core_component *aim;
int refs;
int num_buffers;
 };
@@ -536,9 +536,9 @@ static const struct attribute_group 
*interface_attr_groups[] = {
 /*  ___ ___
  *  ___A I M___
  */
-static struct most_aim *match_module(char *name)
+static struct core_component *match_module(char *name)
 {
-   struct most_aim *aim;
+   struct core_component *aim;
 
list_for_each_entry(aim, _list, list) {
if (!strcmp(aim->name, name))
@@ -583,7 +583,7 @@ static ssize_t links_show(struct device_driver *drv, char 
*buf)
 
 static ssize_t modules_show(struct device_driver *drv, char *buf)
 {
-   struct most_aim *aim;
+   struct core_component *aim;
int offs = 0;
 
list_for_each_entry(aim, _list, list) {
@@ -666,11 +666,11 @@ static struct most_channel *get_channel(char *mdev, char 
*mdev_ch)
 }
 
 static
-inline int link_channel_to_aim(struct most_channel *c, struct most_aim *aim,
+inline int link_channel_to_aim(struct most_channel *c, struct core_component 
*aim,
   char *aim_param)
 {
int ret;
-   struct most_aim **aim_ptr;
+   struct core_component **aim_ptr;
 
if (!c->pipe0.aim)
aim_ptr = >pipe0.aim;
@@ -717,7 +717,7 @@ static ssize_t add_link_store(struct device_driver *drv,
  size_t len)
 {
struct most_channel *c;
-   struct most_aim *aim;
+   struct core_component *aim;
char buffer[STRING_SIZE];
char *mdev;
char *mdev_ch;
@@ -765,7 +765,7 @@ static ssize_t remove_link_store(struct device_driver *drv,
 size_t len)
 {
struct most_channel *c;
-   struct most_aim *aim;
+   struct core_component *aim;
char buffer[STRING_SIZE];
char *mdev;
char *mdev_ch;
@@ -1045,7 +1045,7 @@ static void most_write_completion(struct mbo *mbo)
arm_mbo(mbo);
 }
 
-int channel_has_mbo(struct most_interface *iface, int id, struct most_aim *aim)
+int channel_has_mbo(struct most_interface *iface, int id, struct 
core_component *aim)
 {
struct most_channel *c = iface->p->channel[id];
unsigned long flags;
@@ -1075,7 +1075,7 @@ EXPORT_SYMBOL_GPL(channel_has_mbo);
  * Returns a pointer to MBO on success or NULL otherwise.
  */
 struct mbo *most_get_mbo(struct most_interface *iface, int id,
-struct most_aim *aim)
+struct core_component *aim)
 {
struct mbo *mbo;
struct most_channel *c;
@@ -1180,7 +1180,7 @@ static void most_read_completion(struct mbo *mbo)
  * Returns 0 on success or error code otherwise.
  */
 int most_start_channel(struct most_interface *iface, int id,
-  struct most_aim *aim)
+  struct core_component *aim)
 {
int num_buffer;
int ret;
@@ -1250,7 +1250,7 @@ EXPORT_SYMBOL_GPL(most_start_channel);
  * @id: channel ID
  */
 int most_stop_channel(struct most_interface *iface, int id,
- struct most_aim *aim)
+