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 09/17] staging: tidspbridge: remove msg_mod_init() and msg_exit()
Date: Fri, 9 Mar 2012 01:03:44 +0100 [thread overview]
Message-ID: <8d005b6699a0656a581c3a3e9c03d2087ef64008.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 msg module has a msg_mod_init() and a msg_exit() whose only
purpose is to keep a reference counting which is not used at all.
This patch removes these functions and the reference count variable.
There is no functional changes.
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
---
.../staging/tidspbridge/include/dspbridge/msg.h | 27 --------------------
drivers/staging/tidspbridge/pmgr/dspapi.c | 9 +-----
drivers/staging/tidspbridge/pmgr/msg.c | 21 ---------------
3 files changed, 2 insertions(+), 55 deletions(-)
diff --git a/drivers/staging/tidspbridge/include/dspbridge/msg.h b/drivers/staging/tidspbridge/include/dspbridge/msg.h
index 95778bc..2c8712c 100644
--- a/drivers/staging/tidspbridge/include/dspbridge/msg.h
+++ b/drivers/staging/tidspbridge/include/dspbridge/msg.h
@@ -34,7 +34,6 @@
* msg_callback: Called whenever an RMS_EXIT message is received.
* Returns:
* Requires:
- * msg_mod_init(void) called.
* msg_man != NULL.
* hdev_obj != NULL.
* msg_callback != NULL.
@@ -52,35 +51,9 @@ extern int msg_create(struct msg_mgr **msg_man,
* hmsg_mgr: Handle returned from msg_create().
* Returns:
* Requires:
- * msg_mod_init(void) called.
* Valid hmsg_mgr.
* Ensures:
*/
extern void msg_delete(struct msg_mgr *hmsg_mgr);
-/*
- * ======== msg_exit ========
- * Purpose:
- * Discontinue usage of msg_ctrl module.
- * Parameters:
- * Returns:
- * Requires:
- * msg_mod_init(void) successfully called before.
- * Ensures:
- * Any resources acquired in msg_mod_init(void) will be freed when last
- * msg_ctrl client calls msg_exit(void).
- */
-extern void msg_exit(void);
-
-/*
- * ======== msg_mod_init ========
- * Purpose:
- * Initialize the msg_ctrl module.
- * Parameters:
- * Returns:
- * TRUE if initialization succeeded, FALSE otherwise.
- * Ensures:
- */
-extern bool msg_mod_init(void);
-
#endif /* MSG_ */
diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c
index 5b9dcad..5201bed 100644
--- a/drivers/staging/tidspbridge/pmgr/dspapi.c
+++ b/drivers/staging/tidspbridge/pmgr/dspapi.c
@@ -268,7 +268,6 @@ void api_exit(void)
if (api_c_refs == 0) {
/* Release all modules initialized in api_init(). */
dev_exit();
- msg_exit();
io_exit();
mgr_exit();
}
@@ -282,25 +281,21 @@ void api_exit(void)
bool api_init(void)
{
bool ret = true;
- bool fdev, fmsg, fio;
+ bool fdev, fio;
bool fmgr;
if (api_c_refs == 0) {
/* initialize driver and other modules */
fmgr = mgr_init();
- fmsg = msg_mod_init();
fio = io_init();
fdev = dev_init();
- ret = fdev && fmsg && fio;
+ ret = fdev && fio;
ret = ret && fmgr;
if (!ret) {
if (fmgr)
mgr_exit();
- if (fmsg)
- msg_exit();
-
if (fio)
io_exit();
diff --git a/drivers/staging/tidspbridge/pmgr/msg.c b/drivers/staging/tidspbridge/pmgr/msg.c
index 077c118..f093cfb 100644
--- a/drivers/staging/tidspbridge/pmgr/msg.c
+++ b/drivers/staging/tidspbridge/pmgr/msg.c
@@ -33,9 +33,6 @@
#include <msgobj.h>
#include <dspbridge/msg.h>
-/* ----------------------------------- Globals */
-static u32 refs; /* module reference count */
-
/*
* ======== msg_create ========
* Purpose:
@@ -92,21 +89,3 @@ void msg_delete(struct msg_mgr *hmsg_mgr)
__func__, hmsg_mgr);
}
}
-
-/*
- * ======== msg_exit ========
- */
-void msg_exit(void)
-{
- refs--;
-}
-
-/*
- * ======== msg_mod_init ========
- */
-bool msg_mod_init(void)
-{
- refs++;
-
- return true;
-}
--
1.7.9.1
next prev parent reply other threads:[~2012-03-09 0:04 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 ` Víctor Manuel Jáquez Leal [this message]
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 ` [PATCH 17/17] staging: tidspbridge: remove nldr_init() and nldr_exit() Víctor Manuel Jáquez Leal
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=8d005b6699a0656a581c3a3e9c03d2087ef64008.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®