mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Víctor Manuel Jáquez Leal" <vjaquez@igalia.com>
To: Omar Ramirez Luna <omar.ramirez@ti.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
	Felipe Contreras <felipe.contreras@nokia.com>,
	linux-omap@vger.kernel.org
Subject: [PATCH 17/17] staging: tidspbridge: remove nldr_init() and nldr_exit()
Date: Fri,  9 Mar 2012 01:03:52 +0100	[thread overview]
Message-ID: <15501a475f483f6190aaa0d8bcb61ec4a7102b4e.1331250369.git.vjaquez@igalia.com> (raw)
In-Reply-To: <cover.1331250368.git.vjaquez@igalia.com>
In-Reply-To: <cover.1331250368.git.vjaquez@igalia.com>

The dynamic loader was called by node.c with an interface. This interface was
also modified to avoid the use of nldr_init() and nldr_exit().

There is not functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
---
 .../staging/tidspbridge/include/dspbridge/nldr.h   |    2 -
 .../tidspbridge/include/dspbridge/nldrdefs.h       |   34 --------------------
 drivers/staging/tidspbridge/rmgr/nldr.c            |   19 -----------
 drivers/staging/tidspbridge/rmgr/node.c            |    7 ----
 4 files changed, 0 insertions(+), 62 deletions(-)

diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldr.h b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
index d9653ee..c5e48ca 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldr.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldr.h
@@ -36,7 +36,6 @@ extern int nldr_create(struct nldr_object **nldr,
 			      const struct nldr_attrs *pattrs);
 
 extern void nldr_delete(struct nldr_object *nldr_obj);
-extern void nldr_exit(void);
 
 extern int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
 				    char *str_fxn, u32 * addr);
@@ -44,7 +43,6 @@ extern int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
 extern int nldr_get_rmm_manager(struct nldr_object *nldr,
 				       struct rmm_target_obj **rmm_mgr);
 
-extern bool nldr_init(void);
 extern int nldr_load(struct nldr_nodeobject *nldr_node_obj,
 			    enum nldr_phase phase);
 extern int nldr_unload(struct nldr_nodeobject *nldr_node_obj,
diff --git a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
index ee3a85f..7e3c7f5 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/nldrdefs.h
@@ -119,7 +119,6 @@ enum nldr_phase {
  *      0:        Success.
  *      -ENOMEM:    Insufficient memory on GPP.
  *  Requires:
- *      nldr_init(void) called.
  *      Valid nldr_obj.
  *      node_props != NULL.
  *      nldr_nodeobj != NULL.
@@ -148,7 +147,6 @@ typedef int(*nldr_allocatefxn) (struct nldr_object *nldr_obj,
  *      0:        Success;
  *      -ENOMEM:    Insufficient memory for requested resources.
  *  Requires:
- *      nldr_init(void) called.
  *      nldr != NULL.
  *      hdev_obj != NULL.
  *	pattrs != NULL.
@@ -168,7 +166,6 @@ typedef int(*nldr_createfxn) (struct nldr_object **nldr,
  *      nldr_obj:          Node manager object.
  *  Returns:
  *  Requires:
- *      nldr_init(void) called.
  *      Valid nldr_obj.
  *  Ensures:
  *	nldr_obj invalid
@@ -176,20 +173,6 @@ typedef int(*nldr_createfxn) (struct nldr_object **nldr,
 typedef void (*nldr_deletefxn) (struct nldr_object *nldr_obj);
 
 /*
- *  ======== nldr_exit ========
- *  Discontinue usage of NLDR module.
- *
- *  Parameters:
- *  Returns:
- *  Requires:
- *      nldr_init(void) successfully called before.
- *  Ensures:
- *      Any resources acquired in nldr_init(void) will be freed when last NLDR
- *      client calls nldr_exit(void).
- */
-typedef void (*nldr_exitfxn) (void);
-
-/*
  *  ======== NLDR_Free ========
  *  Free resources allocated in nldr_allocate.
  *
@@ -197,7 +180,6 @@ typedef void (*nldr_exitfxn) (void);
  *      nldr_node_obj:      Handle returned from nldr_allocate().
  *  Returns:
  *  Requires:
- *      nldr_init(void) called.
  *      Valid nldr_node_obj.
  *  Ensures:
  */
@@ -216,7 +198,6 @@ typedef void (*nldr_freefxn) (struct nldr_nodeobject *nldr_node_obj);
  *      0:        Success.
  *      -ESPIPE:    Address of function not found.
  *  Requires:
- *      nldr_init(void) called.
  *      Valid nldr_node_obj.
  *      addr != NULL;
  *      str_fxn != NULL;
@@ -227,17 +208,6 @@ typedef int(*nldr_getfxnaddrfxn) (struct nldr_nodeobject
 					 char *str_fxn, u32 * addr);
 
 /*
- *  ======== nldr_init ========
- *  Initialize the NLDR module.
- *
- *  Parameters:
- *  Returns:
- *      TRUE if initialization succeeded, FALSE otherwise.
- *  Ensures:
- */
-typedef bool(*nldr_initfxn) (void);
-
-/*
  *  ======== nldr_load ========
  *  Load create, delete, or execute phase function of a node on the DSP.
  *
@@ -251,7 +221,6 @@ typedef bool(*nldr_initfxn) (void);
  *                              is already in use.
  *      -EILSEQ:           Failure in dynamic loader library.
  *  Requires:
- *      nldr_init(void) called.
  *      Valid nldr_node_obj.
  *  Ensures:
  */
@@ -269,7 +238,6 @@ typedef int(*nldr_loadfxn) (struct nldr_nodeobject *nldr_node_obj,
  *      0:        Success.
  *      -ENOMEM:    Insufficient memory on GPP.
  *  Requires:
- *      nldr_init(void) called.
  *      Valid nldr_node_obj.
  *  Ensures:
  */
@@ -283,9 +251,7 @@ struct node_ldr_fxns {
 	nldr_allocatefxn allocate;
 	nldr_createfxn create;
 	nldr_deletefxn delete;
-	nldr_exitfxn exit;
 	nldr_getfxnaddrfxn get_fxn_addr;
-	nldr_initfxn init;
 	nldr_loadfxn load;
 	nldr_unloadfxn unload;
 };
diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c
index 46086b5..30d5480 100644
--- a/drivers/staging/tidspbridge/rmgr/nldr.c
+++ b/drivers/staging/tidspbridge/rmgr/nldr.c
@@ -620,15 +620,6 @@ void nldr_delete(struct nldr_object *nldr_obj)
 }
 
 /*
- *  ======== nldr_exit ========
- *  Discontinue usage of NLDR module.
- */
-void nldr_exit(void)
-{
-	/* do nothing */
-}
-
-/*
  *  ======== nldr_get_fxn_addr ========
  */
 int nldr_get_fxn_addr(struct nldr_nodeobject *nldr_node_obj,
@@ -736,16 +727,6 @@ int nldr_get_rmm_manager(struct nldr_object *nldr,
 }
 
 /*
- *  ======== nldr_init ========
- *  Initialize the NLDR module.
- */
-bool nldr_init(void)
-{
-	/* do nothing */
-	return true;
-}
-
-/*
  *  ======== nldr_load ========
  */
 int nldr_load(struct nldr_nodeobject *nldr_node_obj,
diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 908cd1e..7fb426c 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -159,7 +159,6 @@ struct node_mgr {
 	/* Loader properties */
 	struct nldr_object *nldr_obj;	/* Handle to loader */
 	struct node_ldr_fxns nldr_fxns;	/* Handle to loader functions */
-	bool loader_init;	/* Loader Init function succeeded? */
 };
 
 /*
@@ -266,9 +265,7 @@ static struct node_ldr_fxns nldr_fxns = {
 	nldr_allocate,
 	nldr_create,
 	nldr_delete,
-	nldr_exit,
 	nldr_get_fxn_addr,
-	nldr_init,
 	nldr_load,
 	nldr_unload,
 };
@@ -1337,7 +1334,6 @@ int node_create_mgr(struct node_mgr **node_man,
 	nldr_attrs_obj.write = mem_write;
 	nldr_attrs_obj.dsp_word_size = node_mgr_obj->dsp_word_size;
 	nldr_attrs_obj.dsp_mau_size = node_mgr_obj->dsp_mau_size;
-	node_mgr_obj->loader_init = node_mgr_obj->nldr_fxns.init();
 	status = node_mgr_obj->nldr_fxns.create(&node_mgr_obj->nldr_obj,
 			hdev_obj,
 			&nldr_attrs_obj);
@@ -2507,9 +2503,6 @@ static void delete_node_mgr(struct node_mgr *hnode_mgr)
 		if (hnode_mgr->nldr_obj)
 			hnode_mgr->nldr_fxns.delete(hnode_mgr->nldr_obj);
 
-		if (hnode_mgr->loader_init)
-			hnode_mgr->nldr_fxns.exit();
-
 		kfree(hnode_mgr);
 	}
 }
-- 
1.7.9.1


      parent reply	other threads:[~2012-03-09  0:05 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-09  0:03 [PATCH 00/17] staging: tidspbridge: remove unused references counting Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 01/17] staging: tidspbridge: remove drv_init() and drv_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 02/17] staging: tidspbridge: remove cod_init() and cod_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 03/17] staging: tidspbridge: remove proc_init() and proc_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 04/17] staging: tidspbridge: remove node_init() and node_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 05/17] staging: tidspbridge: remove disp_init() and disp_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 06/17] staging: tidspbridge: remove strm_init() and strm_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 07/17] staging: tidspbridge: remove rmm_init() and rmm_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 08/17] staging: tidspbridge: remove chnl_init() and chnl_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 09/17] staging: tidspbridge: remove msg_mod_init() and msg_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 10/17] staging: tidspbridge: remove io_init() and io_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 11/17] staging: tidspbridge: remove cmm_init() and cmm_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 12/17] staging: tidspbridge: remove dmm_init() and dmm_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 13/17] staging: tidspbridge: remove dev_init() and dev_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 14/17] staging: tidspbridge: simplify mgr_init() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 15/17] staging: tidspbridge: remove gh_init() and gh_exit() Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` [PATCH 16/17] staging: tidspbridge: remove ref counting in nldr.c Víctor Manuel Jáquez Leal
2012-03-09  0:03 ` Víctor Manuel Jáquez Leal [this message]

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=15501a475f483f6190aaa0d8bcb61ec4a7102b4e.1331250369.git.vjaquez@igalia.com \
    --to=vjaquez@igalia.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=felipe.contreras@nokia.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=omar.ramirez@ti.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®