summaryrefslogtreecommitdiffstats
path: root/drivers/staging/tidspbridge/pmgr/dev.c
diff options
context:
space:
mode:
authorVíctor Manuel Jáquez Leal2012-03-09 01:03:46 +0100
committerGreg Kroah-Hartman2012-03-09 22:21:07 +0100
commita71aa396eec042606b9722745d4aa4159bde2e87 (patch)
treef0d88ca1c69cbd2baddd0a3ace2f5dbf1f2bd80f /drivers/staging/tidspbridge/pmgr/dev.c
parentstaging: tidspbridge: remove io_init() and io_exit() (diff)
downloadkernel-qcow2-linux-a71aa396eec042606b9722745d4aa4159bde2e87.tar.gz
kernel-qcow2-linux-a71aa396eec042606b9722745d4aa4159bde2e87.tar.xz
kernel-qcow2-linux-a71aa396eec042606b9722745d4aa4159bde2e87.zip
staging: tidspbridge: remove cmm_init() and cmm_exit()
The cmm module has a cmm_init() and a cmm_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/tidspbridge/pmgr/dev.c')
-rw-r--r--drivers/staging/tidspbridge/pmgr/dev.c23
1 files changed, 4 insertions, 19 deletions
diff --git a/drivers/staging/tidspbridge/pmgr/dev.c b/drivers/staging/tidspbridge/pmgr/dev.c
index 883765e3c851..734d47ed9a80 100644
--- a/drivers/staging/tidspbridge/pmgr/dev.c
+++ b/drivers/staging/tidspbridge/pmgr/dev.c
@@ -658,10 +658,8 @@ void dev_exit(void)
{
refs--;
- if (refs == 0) {
- cmm_exit();
+ if (refs == 0)
dmm_exit();
- }
}
/*
@@ -671,23 +669,10 @@ void dev_exit(void)
*/
bool dev_init(void)
{
- bool cmm_ret, dmm_ret, ret = true;
-
- if (refs == 0) {
- cmm_ret = cmm_init();
- dmm_ret = dmm_init();
-
- ret = cmm_ret && dmm_ret;
-
- if (!ret) {
- if (cmm_ret)
- cmm_exit();
+ bool ret = true;
- if (dmm_ret)
- dmm_exit();
-
- }
- }
+ if (refs == 0)
+ dmm_init();
if (ret)
refs++;