From: Víctor Manuel Jáquez Leal Date: Fri, 9 Mar 2012 00:03:40 +0000 (+0100) Subject: staging: tidspbridge: remove disp_init() and disp_exit() X-Git-Tag: MMI-PSA29.97-13-9~17268^2~35 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2f69a43b8f5befc3d110c22a2823170f720432ff;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git staging: tidspbridge: remove disp_init() and disp_exit() The disp module has a disp_init() and a disp_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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/tidspbridge/include/dspbridge/disp.h b/drivers/staging/tidspbridge/include/dspbridge/disp.h index 5dfdc8cfb937..39d3cea9ca8b 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/disp.h +++ b/drivers/staging/tidspbridge/include/dspbridge/disp.h @@ -53,7 +53,6 @@ struct disp_attr { * -ENOMEM: Insufficient memory for requested resources. * -EPERM: Unable to create dispatcher. * Requires: - * disp_init(void) called. * disp_attrs != NULL. * hdev_obj != NULL. * dispatch_obj != NULL. @@ -73,38 +72,12 @@ extern int disp_create(struct disp_object **dispatch_obj, * disp_obj: Node Dispatcher object. * Returns: * Requires: - * disp_init(void) called. * Valid disp_obj. * Ensures: * disp_obj is invalid. */ extern void disp_delete(struct disp_object *disp_obj); -/* - * ======== disp_exit ======== - * Discontinue usage of DISP module. - * - * Parameters: - * Returns: - * Requires: - * disp_init(void) previously called. - * Ensures: - * Any resources acquired in disp_init(void) will be freed when last DISP - * client calls disp_exit(void). - */ -extern void disp_exit(void); - -/* - * ======== disp_init ======== - * Initialize the DISP module. - * - * Parameters: - * Returns: - * TRUE if initialization succeeded, FALSE otherwise. - * Ensures: - */ -extern bool disp_init(void); - /* * ======== disp_node_change_priority ======== * Change the priority of a node currently running on the target. @@ -120,7 +93,6 @@ extern bool disp_init(void); * 0: Success. * -ETIME: A timeout occurred before the DSP responded. * Requires: - * disp_init(void) called. * Valid disp_obj. * hnode != NULL. * Ensures: @@ -148,7 +120,6 @@ extern int disp_node_change_priority(struct disp_object * -ETIME: A timeout occurred before the DSP responded. * -EPERM: A failure occurred, unable to create node. * Requires: - * disp_init(void) called. * Valid disp_obj. * pargs != NULL. * hnode != NULL. @@ -178,7 +149,6 @@ extern int disp_node_create(struct disp_object *disp_obj, * 0: Success. * -ETIME: A timeout occurred before the DSP responded. * Requires: - * disp_init(void) called. * Valid disp_obj. * hnode != NULL. * Ensures: @@ -204,7 +174,6 @@ extern int disp_node_delete(struct disp_object *disp_obj, * 0: Success. * -ETIME: A timeout occurred before the DSP responded. * Requires: - * disp_init(void) called. * Valid disp_obj. * hnode != NULL. * Ensures: diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c index a5f1f6514f88..b1a99f76694c 100644 --- a/drivers/staging/tidspbridge/pmgr/dspapi.c +++ b/drivers/staging/tidspbridge/pmgr/dspapi.c @@ -272,7 +272,6 @@ void api_exit(void) msg_exit(); io_exit(); strm_exit(); - disp_exit(); mgr_exit(); rmm_exit(); } @@ -287,12 +286,11 @@ bool api_init(void) { bool ret = true; bool fdev, fchnl, fmsg, fio; - bool fmgr, fdisp, fstrm, frmm; + bool fmgr, fstrm, frmm; if (api_c_refs == 0) { /* initialize driver and other modules */ fmgr = mgr_init(); - fdisp = disp_init(); fstrm = strm_init(); frmm = rmm_init(); fchnl = chnl_init(); @@ -309,9 +307,6 @@ bool api_init(void) if (fstrm) strm_exit(); - if (fdisp) - disp_exit(); - if (fchnl) chnl_exit(); diff --git a/drivers/staging/tidspbridge/rmgr/disp.c b/drivers/staging/tidspbridge/rmgr/disp.c index e510bb25110b..4af51b75aeab 100644 --- a/drivers/staging/tidspbridge/rmgr/disp.c +++ b/drivers/staging/tidspbridge/rmgr/disp.c @@ -69,8 +69,6 @@ struct disp_object { u32 data_mau_size; /* Size of DSP Data MAU */ }; -static u32 refs; - static void delete_disp(struct disp_object *disp_obj); static int fill_stream_def(rms_word *pdw_buf, u32 *ptotal, u32 offset, struct node_strmdef strm_def, u32 max, @@ -172,29 +170,6 @@ void disp_delete(struct disp_object *disp_obj) delete_disp(disp_obj); } -/* - * ======== disp_exit ======== - * Discontinue usage of DISP module. - */ -void disp_exit(void) -{ - refs--; -} - -/* - * ======== disp_init ======== - * Initialize the DISP module. - */ -bool disp_init(void) -{ - bool ret = true; - - if (ret) - refs++; - - return ret; -} - /* * ======== disp_node_change_priority ======== * Change the priority of a node currently running on the target.