The node module has a node_init() and a node_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>
* -EPERM: A failure occurred, unable to allocate node.
* -EBADR: Proccessor is not in the running state.
* Requires:
* -EPERM: A failure occurred, unable to allocate node.
* -EBADR: Proccessor is not in the running state.
* Requires:
- * node_init(void) called.
* hprocessor != NULL.
* node_uuid != NULL.
* noderes != NULL.
* hprocessor != NULL.
* node_uuid != NULL.
* noderes != NULL.
* -EPERM: General Failure.
* -EINVAL: Invalid Size.
* Requires:
* -EPERM: General Failure.
* -EINVAL: Invalid Size.
* Requires:
- * node_init(void) called.
* pbuffer != NULL.
* Ensures:
*/
* pbuffer != NULL.
* Ensures:
*/
* or NODE_RUNNING state.
* -ETIME: A timeout occurred before the DSP responded.
* Requires:
* or NODE_RUNNING state.
* -ETIME: A timeout occurred before the DSP responded.
* Requires:
- * node_init(void) called.
* Ensures:
* 0 && (Node's current priority == prio)
*/
* Ensures:
* 0 && (Node's current priority == prio)
*/
* Device node to device node, or device node to
* GPP), the two nodes are on different DSPs.
* Requires:
* Device node to device node, or device node to
* GPP), the two nodes are on different DSPs.
* Requires:
- * node_init(void) called.
* Ensures:
*/
extern int node_connect(struct node_object *node1,
* Ensures:
*/
extern int node_connect(struct node_object *node1,
* -ETIME: A timeout occurred before the DSP responded.
* -EPERM: A failure occurred, unable to create node.
* Requires:
* -ETIME: A timeout occurred before the DSP responded.
* -EPERM: A failure occurred, unable to create node.
* Requires:
- * node_init(void) called.
* Ensures:
*/
extern int node_create(struct node_object *hnode);
* Ensures:
*/
extern int node_create(struct node_object *hnode);
* -ENOMEM: Insufficient memory for requested resources.
* -EPERM: General failure.
* Requires:
* -ENOMEM: Insufficient memory for requested resources.
* -EPERM: General failure.
* Requires:
- * node_init(void) called.
* node_man != NULL.
* hdev_obj != NULL.
* Ensures:
* node_man != NULL.
* hdev_obj != NULL.
* Ensures:
* -EPERM: A failure occurred in deleting the node.
* -ESPIPE: Delete function not found in the COFF file.
* Requires:
* -EPERM: A failure occurred in deleting the node.
* -ESPIPE: Delete function not found in the COFF file.
* Requires:
- * node_init(void) called.
* Ensures:
* 0: hnode is invalid.
*/
* Ensures:
* 0: hnode is invalid.
*/
* Returns:
* 0: Success.
* Requires:
* Returns:
* 0: Success.
* Requires:
- * node_init(void) called.
* Valid hnode_mgr.
* Ensures:
*/
* Valid hnode_mgr.
* Ensures:
*/
u32 *pu_num_nodes,
u32 *pu_allocated);
u32 *pu_num_nodes,
u32 *pu_allocated);
-/*
- * ======== node_exit ========
- * Purpose:
- * Discontinue usage of NODE module.
- * Parameters:
- * Returns:
- * Requires:
- * node_init(void) successfully called before.
- * Ensures:
- * Any resources acquired in node_init(void) will be freed when last NODE
- * client calls node_exit(void).
- */
-extern void node_exit(void);
-
/*
* ======== node_free_msg_buf ========
* Purpose:
/*
* ======== node_free_msg_buf ========
* Purpose:
* -EFAULT: Invalid node handle.
* -EPERM: Failure to free the buffer.
* Requires:
* -EFAULT: Invalid node handle.
* -EPERM: Failure to free the buffer.
* Requires:
- * node_init(void) called.
* pbuffer != NULL.
* Ensures:
*/
* pbuffer != NULL.
* Ensures:
*/
* 0: Success.
* -EFAULT: Invalid hnode.
* Requires:
* 0: Success.
* -EFAULT: Invalid hnode.
* Requires:
- * node_init(void) called.
* pattr != NULL.
* Ensures:
* 0: *pattrs contains the node's current attributes.
* pattr != NULL.
* Ensures:
* 0: *pattrs contains the node's current attributes.
* Error occurred while trying to retrieve a message.
* -ETIME: Timeout occurred and no message is available.
* Requires:
* Error occurred while trying to retrieve a message.
* -ETIME: Timeout occurred and no message is available.
* Requires:
- * node_init(void) called.
* message != NULL.
* Ensures:
*/
* message != NULL.
* Ensures:
*/
extern int node_get_nldr_obj(struct node_mgr *hnode_mgr,
struct nldr_object **nldr_ovlyobj);
extern int node_get_nldr_obj(struct node_mgr *hnode_mgr,
struct nldr_object **nldr_ovlyobj);
-/*
- * ======== node_init ========
- * Purpose:
- * Initialize the NODE module.
- * Parameters:
- * Returns:
- * TRUE if initialization succeeded, FALSE otherwise.
- * Ensures:
- */
-extern bool node_init(void);
-
/*
* ======== node_on_exit ========
* Purpose:
/*
* ======== node_on_exit ========
* Purpose:
* -ETIME: A timeout occurred before the DSP responded.
* DSP_EWRONGSTSATE: Node is not in NODE_RUNNING state.
* Requires:
* -ETIME: A timeout occurred before the DSP responded.
* DSP_EWRONGSTSATE: Node is not in NODE_RUNNING state.
* Requires:
- * node_init(void) called.
* Ensures:
*/
extern int node_pause(struct node_object *hnode);
* Ensures:
*/
extern int node_pause(struct node_object *hnode);
* -ETIME: Timeout occurred before message could be set.
* -EBADR: Node is in invalid state for sending messages.
* Requires:
* -ETIME: Timeout occurred before message could be set.
* -EBADR: Node is in invalid state for sending messages.
* Requires:
- * node_init(void) called.
* pmsg != NULL.
* Ensures:
*/
* pmsg != NULL.
* Ensures:
*/
* -ENOSYS: Notification type specified by notify_type is not
* supported.
* Requires:
* -ENOSYS: Notification type specified by notify_type is not
* supported.
* Requires:
- * node_init(void) called.
* hnotification != NULL.
* Ensures:
*/
* hnotification != NULL.
* Ensures:
*/
* DSP_EWRONGSTSATE: Node is not in NODE_PAUSED or NODE_CREATED state.
* -ESPIPE: Execute function not found in the COFF file.
* Requires:
* DSP_EWRONGSTSATE: Node is not in NODE_PAUSED or NODE_CREATED state.
* -ESPIPE: Execute function not found in the COFF file.
* Requires:
- * node_init(void) called.
* Ensures:
*/
extern int node_run(struct node_object *hnode);
* Ensures:
*/
extern int node_run(struct node_object *hnode);
* Unable to terminate the node.
* -EBADR: Operation not valid for the current node state.
* Requires:
* Unable to terminate the node.
* -EBADR: Operation not valid for the current node state.
* Requires:
- * node_init(void) called.
* pstatus != NULL.
* Ensures:
*/
* pstatus != NULL.
* Ensures:
*/
* -EINVAL: The node's stream corresponding to index and dir
* is not a stream to or from the host.
* Requires:
* -EINVAL: The node's stream corresponding to index and dir
* is not a stream to or from the host.
* Requires:
- * node_init(void) called.
* Valid dir.
* chan_id != NULL.
* Ensures:
* Valid dir.
* chan_id != NULL.
* Ensures:
io_exit();
strm_exit();
disp_exit();
io_exit();
strm_exit();
disp_exit();
mgr_exit();
rmm_exit();
}
mgr_exit();
rmm_exit();
}
{
bool ret = true;
bool fdev, fchnl, fmsg, fio;
{
bool ret = true;
bool fdev, fchnl, fmsg, fio;
- bool fmgr, fnode, fdisp, fstrm, frmm;
+ bool fmgr, fdisp, fstrm, frmm;
if (api_c_refs == 0) {
/* initialize driver and other modules */
fmgr = mgr_init();
if (api_c_refs == 0) {
/* initialize driver and other modules */
fmgr = mgr_init();
fdisp = disp_init();
fstrm = strm_init();
frmm = rmm_init();
fdisp = disp_init();
fstrm = strm_init();
frmm = rmm_init();
- if (fnode)
- node_exit();
-
static u32 mem_write(void *priv_ref, u32 dsp_add, void *pbuf,
u32 ul_num_bytes, u32 mem_space);
static u32 mem_write(void *priv_ref, u32 dsp_add, void *pbuf,
u32 ul_num_bytes, u32 mem_space);
-static u32 refs; /* module reference count */
-
/* Dynamic loader functions. */
static struct node_ldr_fxns nldr_fxns = {
nldr_allocate,
/* Dynamic loader functions. */
static struct node_ldr_fxns nldr_fxns = {
nldr_allocate,
-/*
- * ======== node_exit ========
- * Purpose:
- * Discontinue usage of NODE module.
- */
-void node_exit(void)
-{
- refs--;
-}
-
/*
* ======== node_free_msg_buf ========
* Purpose:
/*
* ======== node_free_msg_buf ========
* Purpose:
-/*
- * ======== node_init ========
- * Purpose:
- * Initialize the NODE module.
- */
-bool node_init(void)
-{
- refs++;
-
- return true;
-}
-
/*
* ======== node_on_exit ========
* Purpose:
/*
* ======== node_on_exit ========
* Purpose: