staging: tidspbridge: remove proc_init() and proc_exit()
The proc module has a proc_init() and a proc_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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d4040fadc0
commit
02a63f9dbc
3 changed files with 2 additions and 63 deletions
|
@ -188,20 +188,6 @@ extern int proc_get_resource_info(void *hprocessor,
|
||||||
*resource_info,
|
*resource_info,
|
||||||
u32 resource_info_size);
|
u32 resource_info_size);
|
||||||
|
|
||||||
/*
|
|
||||||
* ======== proc_exit ========
|
|
||||||
* Purpose:
|
|
||||||
* Decrement reference count, and free resources when reference count is
|
|
||||||
* 0.
|
|
||||||
* Parameters:
|
|
||||||
* Returns:
|
|
||||||
* Requires:
|
|
||||||
* PROC is initialized.
|
|
||||||
* Ensures:
|
|
||||||
* When reference count == 0, PROC's private resources are freed.
|
|
||||||
*/
|
|
||||||
extern void proc_exit(void);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ======== proc_get_dev_object =========
|
* ======== proc_get_dev_object =========
|
||||||
* Purpose:
|
* Purpose:
|
||||||
|
@ -222,20 +208,6 @@ extern void proc_exit(void);
|
||||||
extern int proc_get_dev_object(void *hprocessor,
|
extern int proc_get_dev_object(void *hprocessor,
|
||||||
struct dev_object **device_obj);
|
struct dev_object **device_obj);
|
||||||
|
|
||||||
/*
|
|
||||||
* ======== proc_init ========
|
|
||||||
* Purpose:
|
|
||||||
* Initialize PROC's private state, keeping a reference count on each
|
|
||||||
* call.
|
|
||||||
* Parameters:
|
|
||||||
* Returns:
|
|
||||||
* TRUE if initialized; FALSE if error occurred.
|
|
||||||
* Requires:
|
|
||||||
* Ensures:
|
|
||||||
* TRUE: A requirement for the other public PROC functions.
|
|
||||||
*/
|
|
||||||
extern bool proc_init(void);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ======== proc_get_state ========
|
* ======== proc_get_state ========
|
||||||
* Purpose:
|
* Purpose:
|
||||||
|
|
|
@ -274,7 +274,6 @@ void api_exit(void)
|
||||||
strm_exit();
|
strm_exit();
|
||||||
disp_exit();
|
disp_exit();
|
||||||
node_exit();
|
node_exit();
|
||||||
proc_exit();
|
|
||||||
mgr_exit();
|
mgr_exit();
|
||||||
rmm_exit();
|
rmm_exit();
|
||||||
}
|
}
|
||||||
|
@ -289,12 +288,11 @@ bool api_init(void)
|
||||||
{
|
{
|
||||||
bool ret = true;
|
bool ret = true;
|
||||||
bool fdev, fchnl, fmsg, fio;
|
bool fdev, fchnl, fmsg, fio;
|
||||||
bool fmgr, fproc, fnode, fdisp, fstrm, frmm;
|
bool fmgr, fnode, fdisp, fstrm, frmm;
|
||||||
|
|
||||||
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();
|
||||||
fproc = proc_init();
|
|
||||||
fnode = node_init();
|
fnode = node_init();
|
||||||
fdisp = disp_init();
|
fdisp = disp_init();
|
||||||
fstrm = strm_init();
|
fstrm = strm_init();
|
||||||
|
@ -304,7 +302,7 @@ bool api_init(void)
|
||||||
fio = io_init();
|
fio = io_init();
|
||||||
fdev = dev_init();
|
fdev = dev_init();
|
||||||
ret = fdev && fchnl && fmsg && fio;
|
ret = fdev && fchnl && fmsg && fio;
|
||||||
ret = ret && fmgr && fproc && frmm;
|
ret = ret && fmgr && frmm;
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
|
|
||||||
if (fmgr)
|
if (fmgr)
|
||||||
|
@ -313,9 +311,6 @@ bool api_init(void)
|
||||||
if (fstrm)
|
if (fstrm)
|
||||||
strm_exit();
|
strm_exit();
|
||||||
|
|
||||||
if (fproc)
|
|
||||||
proc_exit();
|
|
||||||
|
|
||||||
if (fnode)
|
if (fnode)
|
||||||
node_exit();
|
node_exit();
|
||||||
|
|
||||||
|
|
|
@ -98,8 +98,6 @@ struct proc_object {
|
||||||
struct list_head proc_list;
|
struct list_head proc_list;
|
||||||
};
|
};
|
||||||
|
|
||||||
static u32 refs;
|
|
||||||
|
|
||||||
DEFINE_MUTEX(proc_lock); /* For critical sections */
|
DEFINE_MUTEX(proc_lock); /* For critical sections */
|
||||||
|
|
||||||
/* ----------------------------------- Function Prototypes */
|
/* ----------------------------------- Function Prototypes */
|
||||||
|
@ -908,17 +906,6 @@ func_end:
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* ======== proc_exit ========
|
|
||||||
* Purpose:
|
|
||||||
* Decrement reference count, and free resources when reference count is
|
|
||||||
* 0.
|
|
||||||
*/
|
|
||||||
void proc_exit(void)
|
|
||||||
{
|
|
||||||
refs--;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ======== proc_get_dev_object ========
|
* ======== proc_get_dev_object ========
|
||||||
* Purpose:
|
* Purpose:
|
||||||
|
@ -1009,21 +996,6 @@ int proc_get_trace(void *hprocessor, u8 * pbuf, u32 max_size)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* ======== proc_init ========
|
|
||||||
* Purpose:
|
|
||||||
* Initialize PROC's private state, keeping a reference count on each call
|
|
||||||
*/
|
|
||||||
bool proc_init(void)
|
|
||||||
{
|
|
||||||
bool ret = true;
|
|
||||||
|
|
||||||
if (ret)
|
|
||||||
refs++;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ======== proc_load ========
|
* ======== proc_load ========
|
||||||
* Purpose:
|
* Purpose:
|
||||||
|
|
Loading…
Add table
Reference in a new issue