Commit 1471d6c6 authored by Víctor Manuel Jáquez Leal's avatar Víctor Manuel Jáquez Leal Committed by Greg Kroah-Hartman

staging: tidspbridge: remove msg_mod_init() and msg_exit()

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: default avatarVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9658a54d
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
* msg_callback: Called whenever an RMS_EXIT message is received. * msg_callback: Called whenever an RMS_EXIT message is received.
* Returns: * Returns:
* Requires: * Requires:
* msg_mod_init(void) called.
* msg_man != NULL. * msg_man != NULL.
* hdev_obj != NULL. * hdev_obj != NULL.
* msg_callback != NULL. * msg_callback != NULL.
...@@ -52,35 +51,9 @@ extern int msg_create(struct msg_mgr **msg_man, ...@@ -52,35 +51,9 @@ extern int msg_create(struct msg_mgr **msg_man,
* hmsg_mgr: Handle returned from msg_create(). * hmsg_mgr: Handle returned from msg_create().
* Returns: * Returns:
* Requires: * Requires:
* msg_mod_init(void) called.
* Valid hmsg_mgr. * Valid hmsg_mgr.
* Ensures: * Ensures:
*/ */
extern void msg_delete(struct msg_mgr *hmsg_mgr); 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_ */ #endif /* MSG_ */
...@@ -268,7 +268,6 @@ void api_exit(void) ...@@ -268,7 +268,6 @@ void api_exit(void)
if (api_c_refs == 0) { if (api_c_refs == 0) {
/* Release all modules initialized in api_init(). */ /* Release all modules initialized in api_init(). */
dev_exit(); dev_exit();
msg_exit();
io_exit(); io_exit();
mgr_exit(); mgr_exit();
} }
...@@ -282,25 +281,21 @@ void api_exit(void) ...@@ -282,25 +281,21 @@ void api_exit(void)
bool api_init(void) bool api_init(void)
{ {
bool ret = true; bool ret = true;
bool fdev, fmsg, fio; bool fdev, fio;
bool fmgr; bool fmgr;
if (api_c_refs == 0) { if (api_c_refs == 0) {
/* initialize driver and other modules */ /* initialize driver and other modules */
fmgr = mgr_init(); fmgr = mgr_init();
fmsg = msg_mod_init();
fio = io_init(); fio = io_init();
fdev = dev_init(); fdev = dev_init();
ret = fdev && fmsg && fio; ret = fdev && fio;
ret = ret && fmgr; ret = ret && fmgr;
if (!ret) { if (!ret) {
if (fmgr) if (fmgr)
mgr_exit(); mgr_exit();
if (fmsg)
msg_exit();
if (fio) if (fio)
io_exit(); io_exit();
......
...@@ -33,9 +33,6 @@ ...@@ -33,9 +33,6 @@
#include <msgobj.h> #include <msgobj.h>
#include <dspbridge/msg.h> #include <dspbridge/msg.h>
/* ----------------------------------- Globals */
static u32 refs; /* module reference count */
/* /*
* ======== msg_create ======== * ======== msg_create ========
* Purpose: * Purpose:
...@@ -92,21 +89,3 @@ void msg_delete(struct msg_mgr *hmsg_mgr) ...@@ -92,21 +89,3 @@ void msg_delete(struct msg_mgr *hmsg_mgr)
__func__, hmsg_mgr); __func__, hmsg_mgr);
} }
} }
/*
* ======== msg_exit ========
*/
void msg_exit(void)
{
refs--;
}
/*
* ======== msg_mod_init ========
*/
bool msg_mod_init(void)
{
refs++;
return true;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment