summaryrefslogtreecommitdiffstats
path: root/drivers/staging/tidspbridge/pmgr/dspapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/tidspbridge/pmgr/dspapi.c')
-rw-r--r--drivers/staging/tidspbridge/pmgr/dspapi.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/staging/tidspbridge/pmgr/dspapi.c b/drivers/staging/tidspbridge/pmgr/dspapi.c
index b9ca24c18e13..9ef1ad9527af 100644
--- a/drivers/staging/tidspbridge/pmgr/dspapi.c
+++ b/drivers/staging/tidspbridge/pmgr/dspapi.c
@@ -265,11 +265,8 @@ void api_exit(void)
{
api_c_refs--;
- if (api_c_refs == 0) {
- /* Release all modules initialized in api_init(). */
- dev_exit();
+ if (api_c_refs == 0)
mgr_exit();
- }
}
/*
@@ -280,23 +277,10 @@ void api_exit(void)
bool api_init(void)
{
bool ret = true;
- bool fdev;
- bool fmgr;
-
- if (api_c_refs == 0) {
- /* initialize driver and other modules */
- fmgr = mgr_init();
- fdev = dev_init();
- ret = fdev && fmgr;
- if (!ret) {
- if (fmgr)
- mgr_exit();
+ if (api_c_refs == 0)
+ ret = mgr_init();
- if (fdev)
- dev_exit();
- }
- }
if (ret)
api_c_refs++;