diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2012-03-09 01:03:42 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-03-09 13:21:07 -0800 |
commit | 974f9cd50ae72c02490298372a2a64fb47c4de91 (patch) | |
tree | c5ef51177c7958147dd7adcea6654a5f2ce0f2fd /drivers/staging | |
parent | 311abd9ac44f72f4d10adaaf3af1c273b0f71db8 (diff) |
staging: tidspbridge: remove rmm_init() and rmm_exit()
The rmm module has a rmm_init() and a rmm_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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/tidspbridge/include/dspbridge/rmm.h | 25 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/pmgr/dspapi.c | 10 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/nldr.c | 6 | ||||
-rw-r--r-- | drivers/staging/tidspbridge/rmgr/rmm.c | 20 |
4 files changed, 2 insertions, 59 deletions
diff --git a/drivers/staging/tidspbridge/include/dspbridge/rmm.h b/drivers/staging/tidspbridge/include/dspbridge/rmm.h index baea536681e..f7a4dc8ecb4 100644 --- a/drivers/staging/tidspbridge/include/dspbridge/rmm.h +++ b/drivers/staging/tidspbridge/include/dspbridge/rmm.h @@ -115,18 +115,6 @@ extern int rmm_create(struct rmm_target_obj **target_obj, extern void rmm_delete(struct rmm_target_obj *target); /* - * ======== rmm_exit ======== - * Exit the RMM module - * - * Parameters: - * Returns: - * Requires: - * rmm_init successfully called. - * Ensures: - */ -extern void rmm_exit(void); - -/* * ======== rmm_free ======== * Free or unreserve memory allocated through rmm_alloc(). * @@ -148,19 +136,6 @@ extern bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_addr, u32 size, bool reserved); /* - * ======== rmm_init ======== - * Initialize the RMM module - * - * Parameters: - * Returns: - * TRUE: Success. - * FALSE: Failure. - * Requires: - * Ensures: - */ -extern bool rmm_init(void); - -/* * ======== rmm_stat ======== * Obtain memory segment status * diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c index 06e3b244f83..0a55465b625 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(); mgr_exit(); - rmm_exit(); } } @@ -285,18 +284,17 @@ bool api_init(void) { bool ret = true; bool fdev, fchnl, fmsg, fio; - bool fmgr, frmm; + bool fmgr; if (api_c_refs == 0) { /* initialize driver and other modules */ fmgr = mgr_init(); - frmm = rmm_init(); fchnl = chnl_init(); fmsg = msg_mod_init(); fio = io_init(); fdev = dev_init(); ret = fdev && fchnl && fmsg && fio; - ret = ret && fmgr && frmm; + ret = ret && fmgr; if (!ret) { if (fmgr) @@ -313,10 +311,6 @@ bool api_init(void) if (fdev) dev_exit(); - - if (frmm) - rmm_exit(); - } } if (ret) diff --git a/drivers/staging/tidspbridge/rmgr/nldr.c b/drivers/staging/tidspbridge/rmgr/nldr.c index 5cff46f767b..a9d7a320afd 100644 --- a/drivers/staging/tidspbridge/rmgr/nldr.c +++ b/drivers/staging/tidspbridge/rmgr/nldr.c @@ -628,9 +628,6 @@ void nldr_delete(struct nldr_object *nldr_obj) void nldr_exit(void) { refs--; - - if (refs == 0) - rmm_exit(); } /* @@ -746,9 +743,6 @@ int nldr_get_rmm_manager(struct nldr_object *nldr, */ bool nldr_init(void) { - if (refs == 0) - rmm_init(); - refs++; return true; diff --git a/drivers/staging/tidspbridge/rmgr/rmm.c b/drivers/staging/tidspbridge/rmgr/rmm.c index 55acfcd80a8..52187bd9772 100644 --- a/drivers/staging/tidspbridge/rmgr/rmm.c +++ b/drivers/staging/tidspbridge/rmgr/rmm.c @@ -80,8 +80,6 @@ struct rmm_target_obj { struct list_head ovly_list; /* List of overlay memory in use */ }; -static u32 refs; /* module reference count */ - static bool alloc_block(struct rmm_target_obj *target, u32 segid, u32 size, u32 align, u32 *dsp_address); static bool free_block(struct rmm_target_obj *target, u32 segid, u32 addr, @@ -260,14 +258,6 @@ void rmm_delete(struct rmm_target_obj *target) } /* - * ======== rmm_exit ======== - */ -void rmm_exit(void) -{ - refs--; -} - -/* * ======== rmm_free ======== */ bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_addr, u32 size, @@ -300,16 +290,6 @@ bool rmm_free(struct rmm_target_obj *target, u32 segid, u32 dsp_addr, u32 size, } /* - * ======== rmm_init ======== - */ -bool rmm_init(void) -{ - refs++; - - return true; -} - -/* * ======== rmm_stat ======== */ bool rmm_stat(struct rmm_target_obj *target, enum dsp_memtype segid, |