Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289229
b: refs/heads/master
c: 1471d6c
h: refs/heads/master
i:
  289227: 2badcc7
v: v3
  • Loading branch information
Víctor Manuel Jáquez Leal authored and Greg Kroah-Hartman committed Mar 9, 2012
1 parent 1af0683 commit 2d1180b
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 56 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9658a54dfa86b0c0df7704c8f4315d6e89e95c69
refs/heads/master: 1471d6c69ff7843fb7149218d3afb4d5a2e4426c
27 changes: 0 additions & 27 deletions trunk/drivers/staging/tidspbridge/include/dspbridge/msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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_ */
9 changes: 2 additions & 7 deletions trunk/drivers/staging/tidspbridge/pmgr/dspapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand All @@ -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();

Expand Down
21 changes: 0 additions & 21 deletions trunk/drivers/staging/tidspbridge/pmgr/msg.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
#include <msgobj.h>
#include <dspbridge/msg.h>

/* ----------------------------------- Globals */
static u32 refs; /* module reference count */

/*
* ======== msg_create ========
* Purpose:
Expand Down Expand Up @@ -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;
}

0 comments on commit 2d1180b

Please sign in to comment.